Testcase runner for parametrized testcases

Posted by Razer on Programmers See other posts from Programmers or by Razer
Published on 2013-04-21T16:35:06Z Indexed on 2013/10/21 4:09 UTC
Read the original article Hit count: 324

Filed under:
|
|

Let me explain my situation. I'm planning a kind of test case runner for doing testcases on external devices, which are microcontroller based. Lets consider the devices:

  • Device 1
  • Device 2

There exist a lot of test cases which can be run with one of the devices above. For example:

  • Testcase 1
  • Testcase 2

The main reason that all the testcases can be run with any device is, that the testcases validates some standard and this software should be extensible for future devices.

The testcases itself must be runnable with changing parameters. For example Testcase 1 does some Timing Verification the testcase needs as input parameter the datarate: 4800, 9600, 19200.

Now hoping you understand the situation, let me explain my design questions.

For implementing the test cases I thought about an Attribute based approach, like nunit does it. The more complicated problem is, how to define the parametrized testcases? Like this:

Device 1:
   Testcase 1: 
      datarate: 4800, 9600, 19200
   Testcase 2: 
      supply: 1, 2, 3

Device 2:
   Testcase 1: 
      datarate: 9600, 19200, 38400
   Testcase 2: 
      supply: 3, 4, 5

How would you design such a framework?

I've done a similar desin in python where I had for every device a XML containing the testcase definitions like:

<Testcase="Testcase 1" datarate=4800/>
<Testcase="Testcase 1" datarate=9600/>
<Testcase="Testcase 1" datarate=19200/>

© Programmers or respective owner

Related posts about c#

Related posts about design