Merge pull request #8125 from eugenp/revert-8119-BAEL-3275-2

Revert "BAEL-3275: Using blocking queue for pub-sub"
This commit is contained in:
Eric Martin
2019-10-31 20:43:47 -05:00
committed by GitHub
parent db85c8f275
commit 3225470df5
20543 changed files with 1642750 additions and 0 deletions
@@ -0,0 +1,10 @@
Feature: Testing a REST API
Users should be able to submit GET and POST requests to a web service, represented by WireMock
Scenario: Data Upload to a web service
When users upload data on a project
Then the server should handle it and return a success status
Scenario: Data retrieval from a web service
When users want to get information on the Cucumber project
Then the requested data is returned
@@ -0,0 +1,19 @@
Meta:
Narrative:
As a user
I want to look up a non-existent user's profile on github
So that I can be sure that the username can not be found on github
Scenario: when a user checks a non-existent user on github, github would respond 'not found'
Given github user profile api
And a random non-existent username
When I look for the random user via the api
Then github respond: 404 not found
When I look for eugenp1 via the api
Then github respond: 404 not found
When I look for eugenp2 via the api
Then github respond: 404 not found
@@ -0,0 +1,13 @@
Meta:
Narrative:
As a user
I want to look up a valid user's profile on github
So that I can know that github responds data of type json
Scenario: when a user checks a valid user's profile on github, github would respond json data
Given github user profile api
And a valid username
When I look for the user via the api
Then github respond data of type json
@@ -0,0 +1,12 @@
Meta:
Narrative:
As a user
I want to look up a valid user's profile on github
So that I can know the login payload should be the same as username
Scenario: when a user checks a valid user's profile on github, github's response json should include a login payload with the same username
Given github user profile api
When I look for eugenp via the api
Then github's response contains a 'login' payload same as eugenp
@@ -0,0 +1,15 @@
JBehave Story - An increase test
Meta:
Narrative:
As a user
I want to increase a counter
So that I can have the counter's value increase by 1
Scenario: when a user increases a counter, its value is increased by 1
Given a counter
And the counter has any integral value
When the user increases the counter
Then the value of the counter must be 1 greater than previous value
@@ -0,0 +1,42 @@
Feature: Testing a REST API with Karate
Scenario: Testing valid GET endpoint
Given url 'http://localhost:8080/user/get'
When method GET
Then status 200
Scenario: Testing an invalid GET endpoint - 404
Given url 'http://localhost:8080/user/wrong'
When method GET
Then status 404
Scenario: Testing the exact response of a GET endpoint
Given url 'http://localhost:8080/user/get'
When method GET
Then status 200
And match $ == {id:"1234",name:"John Smith"}
Scenario: Testing the exact response field value of a GET endpoint
Given url 'http://localhost:8080/user/get'
When method GET
Then status 200
And match $.id == "1234"
Scenario: Testing that GET response contains specific field
Given url 'http://localhost:8080/user/get'
When method GET
Then status 200
And match $ contains {id:"1234"}
Scenario: Test GET response using markers
Given url 'http://localhost:8080/user/get'
When method GET
Then status 200
And match $ == {id:"#notnull",name:"John Smith"}
Scenario: Testing a POST endpoint with request body
Given url 'http://localhost:8080/user/create'
And request { id: '1234' , name: 'John Smith'}
When method POST
Then status 200
And match $ contains {id:"#notnull"}