, , , , , ,

Building on what I’ve covered in the last post, I’ve been developing my team’s capability to initiate a batch of automated scripts, which is useful if we’re off to the pub, or need to deploy an updated application quickly.

For this to work, a ‘solution’ must be created in Visual Studio, and the project files for the scripts imported. To do this, simply create a blank solution file (Other Project Types – Visual Studio Solutions, in the New Project window).


The Solution Explorer window appears to the right of the Visual Studio IDE. We have two options here: either create new projects within the solution, or add existing project files.
Because it’s important to name the methods and ‘assertions’ properly this time, in order to pin down errors within a much larger test, I’ve created new script projects from scratch. These will be two very basic scripts – one of which is a webmail account login and logout, and the other uses the calculator application.

Right-click inside Solution Explorer and select Add — New Project.


When created, follow the same procedure as before to onfirm the first script works on its own, then right-click on the solution title to add another project. The calculator application script has ‘assertions’ added for checking the application’s output is what it should be, and that specific interface elements are displaying the right text.

Once that’s working, return to the Visual Studio IDE. The two test projects are listed in the Solution Explorer window..


The final step is to run both projects in sequence instead of individually. You’re probably going mental trying to figure out how to do this. What I did was, in the Test Explorer window, click the ‘Run All’ link. This will execute the chain of test scripts we’ve created.