Exporting test scripts from Spec Explorer

209 views Asked by At

Can someone explain how to use TestAdapter concept in Microsoft's Spec Explorer, to export tests..say, in .CSV format?

I tried browsing through, but no clear answers anywhere. Prefer to get the solution in C#

1

There are 1 answers

7
goofy On

Your idea is good, if your tests are completely deterministic. In this case you have no methods of type "public static event" in your test adpater and so you are not listening to responses from your system under test and your explored graphs do not show any diamonds and finally you have no if-clauses in your test-case code.

In this simple case you can simply add to every test adapter method a very simple write-to-file command and you write e.g. the name of the method and the arguments.

If you have non-determinism (if-clauses) this simple approach is not really working, because you will not traverse all branches in the control flow of your test-case. In this case you can traverse the test case with the use of the method described here:

http://social.msdn.microsoft.com/Forums/en-US/d1c9f98f-4588-4516-8d51-be2590300f85/using-specexplorer-with-silverlight?forum=specexplorer

or directly using the Microsoft.SpecExplorer.ObjectModel. An example for this is the Requirements report you find in the Spec Explorer examples.