<?xml version="1.0" encoding="utf-8"?> <Rows> <Row> <name>My First Tests_FullNameTest</name> <result>pass</result> <summary>My First Tests: FullNameTest (0, 1, 1)Rerun full name built properlyExpected: "Nick Olson"</summary> </Row> <Row> <name>My First Tests_capitalizeTest</name> <result>pass</result> <summary>My First Tests: capitalizeTest (0, 1, 1)Rerun capitalize worksExpected: "OLSON"</summary> </Row> <Row> <name>My Second Tests_FullNameTest</name> <result>pass</result> <summary>My Second Tests: FullNameTest (0, 1, 1)Rerun full name built properlyExpected: "Brian Olson"</summary> </Row> <Row> <name>My Second Tests_FullNameFailTest</name> <result>fail</result> <summary>My Second Tests: FullNameFailTest (1, 0, 1)Rerun full name built properlyExpected: "Brian Olson" Result: "Nick Olson" Diff: "Brian "Nick Olson" </summary> </Row> </Rows>
This is the aggregated test results for both of our test pages. The last little bit is a simple data driven unit test that takes this xml file and basically just asserts on the result element of each Row in the xml document
So there you go, test in the browser, test in Visual Studio it’s up to you. Generally I like to work on the html test page while I’m working and writing my tests and let the MSTest integration work for me on a build server or something else when the tests are run.
Here is the complete little sample app, JsTestComplete.zip