aspose file tools*
The moose likes Testing and the fly likes configurable test and conjunction test Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Testing
Bookmark "configurable test and conjunction test" Watch "configurable test and conjunction test" New topic
Author

configurable test and conjunction test

simon sheng
Greenhorn

Joined: Oct 31, 2013
Posts: 2
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

Joined: May 26, 2003
Posts: 30924
    
158

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
simon sheng
Greenhorn

Joined: Oct 31, 2013
Posts: 2
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: configurable test and conjunction test