Yeah, sure.
I’m trying to build a platform to facilitate Unit Testing within the Developer environment, so that we can bring the extreme programming philosofy to it.
The idea is to provide utility methods that make it easy to write unit tests for a given package, and then a jsp application that executes them all and displays the results.
One of the flow services I implemented receives a method name, its inputs and the tests to execute (basically assert conditions) and it’s called testService().
Another service I am trying to implement is an utility to gather the inputs and method name of a service at runtime (createTestSet()). It would allow for a strategy somewhat like the get/restore pipeline debugging tactique: the createTestSet() is added at the beggining of the service that needs testing, and at runtime it’ll capture the inputs so that they can be reused for testing.
The main advantage is that after the inputs are caught, you can delete the createTestSet() reference from the service. Thereafter, there is no mixing of “actual” code and testing code, which is done elsewhere through the use of the testService() function. Another advantage is that the output is automatically tested with the rules given, so there’s no need for a manual inspection of the result tab.
So, as you can see, there are a lot of fuctions that use reflexion: they need to determine at runtime the variables they’ll be dealing with, services they’ll be calling, etc. Needless to say that there are a lot of java services, but I try to keep this to a minimum.
In any case, besides the input variables problem, I’m currently stuck at two other issues:
.output variables: it’s the exact symmetrical of the input variables, I need this to implement a cleaner pipeline management (how can you drop variables that aren’t in the output if you don’t know what’s the output like? )
.listing services: how can I get a list of services from a package? This would be needed for the second part of the project, the jsp application.
Any help will be welcome.