This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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
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.
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.