Unit and Behavioral Testing - SCCapstone/imentor GitHub Wiki
Unit Testing
We are using the built-in unit testing tools inside Visual Studio for testing the functions used to access the database and display the information. Each function will be tested to make sure that it is properly manipulating the data in the database and returning the expected values back. All tests will be ran inside Visual Studio using the test explorer.
Behavioral Testing
We have used Selenium Webdriver for Behavioral Testing. Selenium allows us to simulate a user accessing the website, seeing specific elements, and making actions, covering all our fundamental goals for behavioral testing. Tests have been divided into three functions, each simulating a sequence of smaller test assertions in a reasonable order emulating a real user's navigation patterns. These functions cover all of the pages, test each page for essential elements and text, and all sequences start from the homepage, demonstrating realistic navigability.
NOTE: A trivial bug was discovered when it comes to running the Selenium tests on machines other than the origin one. This has been determined to be an issue with the chromedriver.exe file not being recognized (even after including the file in the project, and using implicit and explicit file paths). The file itself can be re-downloaded on any machine and should run with the code provided. Screenshots will be provided of the tests running to completion on the origin machine. Questions can be directed at myself, Michael Rickabaugh (I handled behavioral testing for the app).
As evident above, three instances of the driver are opened (automatically via command prompt), the testing sequences run, and they succeed.
Selenium Web-Driver example use: http://www.guru99.com/first-webdriver-script.html