Automated Functional Testing


Here are the steps to take to start using the automated test script developed by your TA.

  1. Download and install the Postman application. Documentation is available here
  2. Launch Postman. Go to "File > Import" and then select "Import from link", enter the following link: https://www.getpostman.com/collections/90a68ffa2a0ef82a751c and then press "Import". On the left pane select the "Collections" tab: you should see a collection called API_TESTS. There are four sets of tests in this collection, the first three correspond to tests for "Accounts", "Rides", and "Reports"; they are grouped by resource type for convenience and you can run them in any order you want. The last set of tests, named "Automated Tests" includes all the tests described in the Project Functional Testing document, in the same order; as the name says, this is the automated test suite that you can execute by just pressing a button. When all the tests pass you know that you're done. NOTE: this is the same test suite we'll be using when grading your project.
  3. Create an environment in which to run the automated suite:
    • Press the "New" button in the upper left corner of the main Postmans screen and select "Environment" for the menu.
    • Choose a name for the new environment, such as "cs445 project - automated test suite", then press "Add".
    • Close the "MANAGE ENVIRONMENTS" window.
  4. Start the server that accepts and responds to REST requests for your application. The test script assumes that the server is running locally and listening for requests on port 8080 ( http://localhost:8080/sar ).
  5. Run the automated test suite:
    • Press the "Runner" button on the top left side of the main Postman screen: this will open a "Collection Runner" window; you should see the API_TESTS in the left pane, under "All Collections", click on it and then click on "Automated Tests".
    • Select the newly created environment from the "Environment" pull down menu.
    • Click on the big blue "Run API_TESTS" at the bottom of the left pane and find out how many of the tests are passing.

Any questions/commments about the script? Please let the TA and your instructor know.


Last update: Apr 13, 2020 Virgil Bistriceanu cs445 Computer Science