Structured Test Output

50 views
Skip to first unread message

jdscolam

unread,
Oct 9, 2012, 3:08:58 PM10/9/12
to nuni...@googlegroups.com
Are there any options for structured test output other than the TextWriter?  Something like a TestResult object collection?  Also, is there a way to programatically select which tests to execute within the current assembly?

Charlie Poole

unread,
Oct 9, 2012, 3:17:05 PM10/9/12
to nuni...@googlegroups.com
NUnitLite is able to create an XML output file, similar to that
created by NUnit.
Of course, internally it uses an object to represent the test results.

It depends on how you want to use NUnitLite. Normal programatic use
involves simply passing the arguments provided by the user directly
to the NUnitLite console runner. In that case, the -test option could be
used to specify the tests to be run.

If you want to call into NUnitLite at a deeper level, it's possible to do
more. Can you explain in a bit more detail what you're doing?

Charlie
> --
> You received this message because you are subscribed to the Google Groups
> "NUnitLite" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/nunitlite/-/9j01jz1caDUJ.
> To post to this group, send email to nuni...@googlegroups.com.
> To unsubscribe from this group, send email to
> nunitlite+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/nunitlite?hl=en.

jdscolam

unread,
Oct 10, 2012, 4:12:21 PM10/10/12
to nuni...@googlegroups.com
Thanks for the response!  I am actually using the tests to express simple tests on a completely different Api (kinda  an odd usage I know).  My goal is to get a list of the tests defined within the system, then run those tests against the other system, and the report the results.  A results object would be perfect if I could get the collection of those for all run tests in the system.
 
Does that make sense?

Charlie Poole

unread,
Oct 10, 2012, 6:10:24 PM10/10/12
to nuni...@googlegroups.com
If all you want is a list of tests, NUnitLite will do that using the
-explore option.
No need to run them at all.

Charlie
> https://groups.google.com/d/msg/nunitlite/-/4qAM-eUTD-AJ.

jdscolam

unread,
Oct 11, 2012, 9:36:06 AM10/11/12
to nuni...@googlegroups.com
Can I do that from code at runtime?
 
Also, I do want to run the tests and get the output as well.  Again, at runtime from the code :).
 
Thanks again!
 
-Jon

Charlie Poole

unread,
Oct 11, 2012, 10:56:55 AM10/11/12
to nuni...@googlegroups.com
NUnitLite tests are usually run from code. The tests are generally in an exe and
and the Main calls NUnitLite. You can do something similar, passing in the
name of the assembly and any options. This is documented in the NUnitLite
code, which you can include in your own project or use as a separate assembly.

Charlie
> https://groups.google.com/d/msg/nunitlite/-/w5zydEH5tIwJ.
Reply all
Reply to author
Forward
0 new messages