Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

configurable test and conjunction test

 
simon sheng
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am thinking about a new test approach which is given name: configurable test.
see all tests we are doing now is grab that code and test it, for "grab that code" part, in unit (unit test is only a example, configurable test is cross to and cover whole test chain) test of java or c#, we create our test object like this:



than we test particular method:



we pass the parameters and get the result. if you use junit then you can do assert clause to check the result.

why we keep developer do this simple repetition work?

I am thinking we can do configurable test. using a configuration file (like xml file) to define our test like this


then we can use the test framework we are going to create to run the test with this config file.
the test framework will create the object, and post parameters to the method we are going to test and check the result.
then we can log the result or only print them out.

the benefits we get:
1, apparently no
1, not only the developer can understand this test, QA and UAT, anybody can understand this test.(when we do black test, our tester may or may not understand the language developer is using)
2, it is extendable, next level test can read and understand what we did, they can base on our test, add their test, like wrap some unit test as end to end test.
3, easy to do conjunction test which will discuss below

conjunction test

basically if all test is configurable then we can join them together, see this example:
we have dao layer, business layer and representation layer, we can test them separately, but it's very hard to test them together programmable , because many reasons, but
if all test is configurable, then we can easily config not program a end to end test.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34178
340
Eclipse IDE Java VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Simon,
Welcome to CodeRanch!

In JUnit, that sounds like a ParameterizedTest. As far as making tests QA friendly, take a look at fitnesse. Making tests easy to deal with is a great goal.
 
simon sheng
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeanne,

Thank you for your replay, and these two projects are very good references.
I just roughly saw them but for the ParameterizedTest, tester still need to know java, I am thinking computer language independence but only xml configuration, fitnesse is very good too but we have to set up extra environment for it. My idea basically no environment requesting.
I like these ideas of them, they expande my horizons. I will read them deeper. If you know anything else cool like them. I am glad to know.

Thank you so much for your replay
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic