This post shows how I went from a git clone to a full execution of all unit tests.
It all starts with a clone of the https://github.com/TeamMentor/UnitTests_WebAutomation repository
Once the clone completed, I opened the TeamMentor.WebAutomation.sln solution file in VisualStudio 2010
Chose to run all UnitTests , and:
.. the reason that all tests failed, was because I didn’t have the expected folder in my dev box:
Since I was was looking at the code, I might as well fix this and remove this hard-coded dependency from this test.
To do that, I refactored that string into the Settings.Settings file:
which puts the content on the app.config file:
With these changes, the UnitTests will start execution by opening up the Chrome WebDriver app:
Note that these tests are all running on a ‘live’ instance of TeamMentor:
... including the cases where Login is needed
Finally, once all tests execute we get the nice view of:
One important requirement (that is not going to be clear from the TeamMentor screenshots shown above), is that a) the current tests expect the OWASP and Top_Vulnerabilities Libraries to be the only libraries on the target server, and b) that some tests failed on first run (but succeeded when manually executed.