There are many test tools that could do this job much faster, but they are complex to use and mostly pretty expensive.
So I did some thinking…….I want to do lean and mean Calculation Component Analyzing!
Preferably: User-friendly, quick, low cost and in a way that the outcome is easy to check!
Personally I like pictures instead of figures. So I started some PHP programming, and voila these are my results:
The first version is a service that can analyze a “one parameter” Calculation Component. Let me give an example.
The test object is a web component with one input parameter. In my home made analyzer service I give the URL of the test object, the start input value, the end input value and the step size (see fig.1)
After sending the input, the analyzer performs, in this case, 21 calls to the test object, and responses with the following graphics:
This output gives a first impression of the calculation. It looks like: output=input*input (if input > zero) or output=input*input (if input >= zero).
But to be sure, let's make the steps in the range smaller(step=10):
That’s strange! The input value 10 gives a response: zero!
Again, let's choose step=1:
Now I'm pretty sure that the calculation function is: output=input*input (if input greater than ten)
And for a last check (in this example) I choose step=0.1:
Yes, it still looks like: output=input*input (if input greater than ten)
I think that this kind of functionality is valuable, not only for testing, but also for documenting Calculation Components.
Above that, it is:
- Easy to use (one simple input screen),
- Low cost (I did build the function in 2 hours (with the help of open source: PHPLOT)),
- Quick (the above analyzing took me 3 minutes (including capturing the pictures for my blog)),
- Simple to read.
And it's FUN to play with!
Now I'll try to find some use for this kind of functionality, and l start thinking how to handle (and present the outcome) for a “two parameter” Calculation Component.