Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

My office has a suite of web reporting engines written in VB. All in all there's about 300 reports with varying displays depending on the data being input into them. I'm trying to establish an efficient way to deal with such a major diversity, but am struggling with creating a system that won't be a nightmare to code/maintain.

What I've considered doing is:

  1. On program launch, read the steps required for each test page. This may have multiple tests for the same page with varying inputs.
  2. Write each iteration of the test in XML file under $env:temp/testname
  3. Use the TestCaseSource attribute of Nunit to funnel every related xml file as a source.

My major stumbling block has been how to get that data to the Nunit framework. Is Nunit really appropriate for what I'm trying to do, or is it too static?

share|improve this question
    
Did you combine TestCaseSource with a test data factory producing TestCaseData objects, like shown in the NUnit docs here nunit.org/index.php?p=testCaseSource&r=2.5.9 ? This seems to allow dynamic test data generation at run time. –  Doc Brown Nov 12 '13 at 17:22
    
@DocBrown: I hadn't seen something in quite that direction. I think yielding an instruction step would actually bypass the need of an XML file. Mind C&P'ing that into an answer? –  Jacobm001 Nov 13 '13 at 16:52
add comment

1 Answer

up vote 1 down vote accepted

You can combine TestCaseSource with a test data factory producing TestCaseData objects, like shown in the NUnit docs here http://www.nunit.org/index.php?p=testCaseSource&r=2.5.9

This will allow dynamic test data generation at run time. Maybe that is what you are looking for.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.