You create a layered web application. The service layer includes a suite of nUnit tests for the code. The web application contains JavaScript and has no tests.
You configure a build agent running as a service and create an automated build.
You need to include unit testing in the development and automated build of the application. You need to achieve this goal with the least amount of impact to the development team.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
A. Configure the build to use the existing nUnit tests.
B. Create QUnit tests to test the Javascript in the web application.
C. Use Coded UI Tests to test the JavaScript in the web application.
D. Convert all the nUnit tests for the business logic layer into MSTests.
Correct Answer: AB
Explanation/Reference:
A: Lets now create our first NUnit test project
1. Go to File -> New -> Project and under Visual C# choose "Class Library" and rename to "NUnitTests". You may also want to rename your "Class1.cs" into something more sensible e.g.NUnitTests
2. In the Solution Explorer right-click on references then click "Manage NuGet Packages".
3. On the left tab click on "Online" and then on the Search field type "NUnit" this time. When the result appears click "Install".
4. All the relevant classes required for NUnit should now be included in the project -- it’s now time to write some unit tests!
B: QUnit is a JavaScript unit testing framework. While heavily used by the jQuery Project for testing jQuery, jQuery UI and jQuery Mobile, it is a generic framework to test any JavaScript code.
QUnit is a powerful, easy-to-use JavaScript unit testing framework. It’s used by the jQuery, jQuery UI and jQuery Mobile projects and is capable of testing any generic JavaScript code, including itself
Reference: Test Driven Development using NUnit natively in Visual Studio 2012 JavaScript Unit Testing with Visual Studio