简体   繁体   中英

Exporting test scripts from Spec Explorer

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#

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 eg 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM