Automated Functional Testing


Here are the steps to take to start using the automated test script I developed for this project using Postman.

  1. Download and install the Postman application. Documentation is available here
  2. Launch Postman. If this is the first time you're usuing the tool, select "Workspaces" from the menu on the upper left and then press "Create Workspace". Name the workspace something meaningful, such as "cs445 Buy Nothing Project", select "Personal" for Visibility and then press "Create Workspace".
  3. Select the newly created workspace from the "Workspaces" menu. The name of the workspace will be visible in the upper left corner, below the Home menu item.
  4. Go to "File > Import", select "Link" from the top of the box and enter the following link: https://www.getpostman.com/collections/aa2b389418c634499d30 and then press "Continue" and "Import". On the left pane select the "Collections" tab: you should see a collection called "Buy Nothing Tests".
    • NOTE: If you're re-importing the collection in order to run the most up-to-date tests, then start by removing the existing "Buy Nothing Tests" followed by importing the latest version, use the link specified above.
  5. Create an environment in which to run the automated test suite:
    • Press the "New" button in the upper left corner of the main Postman's screen and select "Environment" for the menu.
    • Choose a name for the new environment, such as "cs445 project - localhost" and create a variable named base_url of type 'default' and with the Initial and Current Values of http://localhost:8080/bn/api, then press "Save".
  6. Start the server where you deployed your application. The test scripts in the collection will be running against the base URL defined by the base_url variable.
  7. Run the automated test suite:
    • Select the "Buy Nothing Tests" from Collections.
    • Hover over the "Buy Nothing Tests" name, press the ellipsis on the right of the name, and select "Run Collection" from that menu.
    • Make sure the "cs445 project - localhost" is selected from the pull down menu in the upper right.
    • Click on the blue "Run Buy Nothing Tests" to find out how many of the tests are passing.

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


Last update: Apr 6, 2022 Virgil Bistriceanu cs445 Computer Science