Project Functional Testing
For purposes of this description, all URLs are relative to the base url of http://localhost:8080/lf2u
The JSON used for testing purposes will match the format desribed in the
project API.
Functional testing will begin only after the tester was able to build the project following your build
instructions and then deploy the resulting .war file to a tomcat server. The specific actions taken by
the tester before beginning functional acceptance testing are described
here.
So, here are the steps we'll take to test the functionality of your project.
- Verify that there is one manager account ( GET /managers/accounts )
- View the detail of the existing (default) manager account ( GET /managers/accounts/{mid} )
- Validate that the general catalog is empty ( GET /managers/catalog )
- Add product ("Potatoes") to general catalog ( POST /managers/catalog ); this is gcpid1
- Add product ("Tomatoes") to general catalog ( POST /managers/catalog ); this is gcpid2
- Add product ("Eggplant") to general catalog ( POST /managers/catalog ); this is gcpid3
- Add product ("Onions") to general catalog ( POST /managers/catalog ); this is gcpid4
- Verify that the catalog contains the four products added in the previous steps ( GET /managers/catalog )
- Update gcpid1 (from "Potatoes" to "Potatoes (red)")
- Verify that gppid1 has been updated ( GET /managers/catalog )
- Verify that there are no farmer accounts ( GET /farmers )
- Verify that there are no farmer accounts when a zip code is specified ( GET /farmers?zip=60010 )
-
Create new farmer account ("SafeHouse Farm Alpacas", delivers to 60010, 60011, 60067) ( POST /farmers );
this is fid1. View JSON
- Verify that the farmer account has been created; there should be one farmer account ( GET /farmers )
- Validate the farmer account detail ( GET /farmers/{fid1} )
- Verify that there is one farmer account that delivers in zip code 60010 ( GET /farmers?zip=60010 )
- Verify that there is no farmer account that delivers in zip code 60616 ( GET /farmers?zip=60616 )
-
Update the farmer account detail for fid1 as ("Tall Trees", delivers to 60010, 60011) ( PUT /farmers/{fid1} ).
View JSON
- Validate the farmer account detail ( GET /farmers/{fid1} )
-
Create new farmer account ("Tudor Oaks", delivers to 60010, 60616, 60067) ( POST /farmers ); this is fid2.
View JSON
- Verify that the farmer account has been created, there should be two farmer accounts ( GET /farmers )
- Validate the farmer account detail ( GET /farmers/{fid2} )
- Verify that there are two farmer accounts that deliver in zip code 60010 ( GET /farmers?zip=60010 )
- Check the delivery charge for fid1, expected result is 0.00 ( GET /farmers/{fid1}/delivery_charge )
-
Update the delivery charge for fid1 to 5.00 ( POST /farmers/{fid1}/delivery_charge ).
View JSON
- Verify the delivery charge for fid1, expected result is 5.00 ( GET /farmers/{fid1}/delivery_charge )
- Check the delivery charge for fid2, expected result is 0.00 ( GET /farmers/{fid2}/delivery_charge )
-
Update the delivery charge for fid2 to 9.95 ( POST /farmers/{fid2}/delivery_charge ).
View JSON
- Verify the delivery charge for fid2, expected result is 9.95 ( GET /farmers/{fid2}/delivery_charge )
- Verify that the store for fid1 is empty ( GET /farmers/{fid1}/products )
-
Add gcpid1 to fid1 store ( POST /farmers/{fid1}/products ); this will create fspid1.
View JSON
- Verify that the store for fid1 has one product ( GET /farmers/{fid1}/products )
-
Add a note to fspid1 and modify the price ( POST /farmers/{fid1}/products/{fspid1} )
View JSON
- Verify the detail for fspid1; the note and the price should be updated ( GET /farmers/{fid1}/products/{fspid1} )
-
Add gcpid2 to fid1 store, ( POST /farmers/{fid1}/products ); this will create fspid2.
View JSON
-
Add gcpid3 to fid1 store, ( POST /farmers/{fid1}/products ); this will create fspid3.
View JSON
-
Review the products available in the fid1 store ( GET farmers/{fid1}/products ).
View JSON response.
-
Add gcpid2 to fid2 store, ( POST /farmers/{fid2}/products ); this will create fspid4.
View JSON.
-
Review the products available in the fid2 store ( GET farmers/{fid2}/products ).
View JSON response.
-
Review reports available for fid1. View response JSON
-
Review reports available for fid2. They should be the exact same as available for fid1
-
Execute the report identified by frid1 ( GET /farmers/{fid1}/reports/{frid1} ).
View JSON response.
-
Execute the report identified by frid2 ( GET /farmers/{fid1}/reports/{frid2} ).
View JSON response.
- Verify that there are no customers ( GET /search?topic=customer&key= )
-
Create customer account ( POST /customers); this is cid1.
View JSON.
-
Verify that there is one customer ( GET /search?topic=customer&key= ).
View JSON response.
-
View account information for cid1 ( GET /customers/{cid1} ).
View JSON response.
-
Attempt to update the user account with incomplete data in the PUT payload
( PUT /customers/{cid1} ). View JSON.
Expect a 400 (Bad Request) from the server.
-
Update the user account ( PUT /customers/{cid1} ). View JSON.
-
Verify that the account information for cid1 has been updated ( GET /customers/{cid1} ).
View JSON response.
-
Verify that this user has no orders ( GET /customers/{cid1}/orders ). The response should
be an empty array.
-
Create an order ( POST /customers/{cid1}/orders ); specify a farm that doesn't deliver in cid1 zip code.
View JSON.
Expect a 422 (Unprocessable Entity) error.
-
Update the user account ( PUT /customers/{cid1} ). View JSON.
-
Create an order with fid1 ( POST /customers/{cid1}/orders ). This is oid1.
View JSON.
View JSON response.
-
View all orders placed by cid1 ( GET /customers/{cid1}/orders).
View JSON response. NOTE: in the JSON response
<today> stands for the date when the project is being tested, e.g. 20161116, etc.
-
Verify the detail for order oid1 placed by cid1 with farm fid1 ( GET /customers/{cid1}/orders/{oid1} ).
View JSON response.
-
Create an order with fid2 ( POST /customers/{cid1}/orders ). This is oid2.
View JSON.
View JSON response.
-
View all orders placed by cid1 ( GET /customers/{cid1}/orders).
View JSON response. NOTE: in the JSON response
<today> stands for the date when the project is being tested, e.g. 20161116, etc.
-
Verify the detail for order oid2 placed by cid1 with farm fid2 ( GET /customers/{cid1}/orders/{oid2} ).
View JSON response.
-
Get the report, for farm fid1, identified by frid2 ( GET /farmers/{fid1}/reports/{frid2} ).
View JSON response.
-
Generate the management report for orders placed today ( GET /managers/reports/{mrid1} ).
View JSON response.
- ... This is work in progress, more will be added over the next few days.
$Id: project-functional-testing-instructions.html,v 1.5 2016/11/15 05:07:27 virgil Exp $
|