My fellow German developer Eberhard Wolff is speaking this morning about acceptance and stress testing to meet requirements.
As an introduction he's wrapping up what Spring provides in the org.springframework.test package.
Acceptance Tests
Now we are getting into Acceptance Tests. You use them to find errors in the implementation of business requirements or use cases. One can see them as formalized requirements. Unfortunately many times they are done manually and after the whole system has been developed. Fit/FitNesse is a tool for acceptance tests. The customer and the developer should write the acceptance tests together - so does XP say. Fit/FitNesse uses HTML as input format. Test data and expected results are provided as HTML tables. You need to write a simple class as a wrapper for business logic, which can be injected using @Configurable. This class is then used to pass data into the test and check the results.
Eberhard is working on a general Fit Exporter for Spring. It's currently Alpha code.
The SpringActionFixture can be used to test actions that are usually performed in a GUI. You specify input data and actions - e.g. press add button - and then look for results. In the HTML input file you use the expression "press" to call a method. So the UI stuff is left out, but the method that normally be called by the UI is now being called by FitNesse.
One question from the audience is whether you can run Fit/Fitnesse as part of a Maven build. As it's a command line tool that should be no problem.
Fit uses HTML files as input. Fitnesse uses Wiki pages. Triggered by a question from the audience Eberhard opinions that probably Word documents that get exported to HTML are the best solution to get business people to provide test data and rules.
Performance Tests
JMeter is a good tool to performance test web based applications. JMeter creates a large number of requests, but how do you measure the performance in the whole system. You want to measure each part of the system. Using a regular profiler for Java would not be sufficient for the purpose of performance tests, because it only focuses on the Java code itself. JAMon is a monitoring framework, which offers a Spring interceptor. For web application you configure a filter in web.xml. The JAMon filter measures HTTP request/response. JAMon profiles method calls using AOP. JAMon can be used as well to profile other parts of the system by simply declaring other AOP aspects, e.g. you could use it to profile SQL queries.
One could use JAMon even in production as the overhead is very little. It can use exiting Pointcuts and Spring AOP proxies.
Previous | 10 Dec 2006 | Next |
This article has been posted to social media sites. There might be comments. Just follow the links:
About me
Hello! My name is Stephan Schwab.
As International Software Development Coach and Consultant I help CEOs and Department Leaders to improve value creation and cohesion within their organization. The outcome will be higher quality, customer delight and more revenue.
Learn about my professional experience since 1986.
Professional Services
I'm fluent in these human languages:
Scrum Pair-Coaching to develop technical competence:
Resources for new clients:
Search
Special Content
Highlights of the Year
Living on planet Earth
Open Source Projects
Stay in touch
My Books
Everything
See a listing of all posts on this site.