With performance testing, the load behavior of an application are tested under laboratory conditions. This manufacturer of test tools offer their own tools, their use result in more investment. In this article, the use of JUnit as an alternative from the Open Source area investigated.
Modern software architectures consist of several application levels / layers. For the scope of this article it is sufficient to consider the following three layers:
- presentation layer (presentation logic, realized by thin or fat client)
- application layer (central, server-side application logic)
- database or othe connection of back-end systems
load test tools consist of at least the following three components:
- " scripts " in test scripts to define the business case (by programming or recording)
- load generators : by means of a load generator, the business cases executed and parallel access to the application. For this purpose they use the concept of "Concurrent User" or "Virtual User". Each script is assigned to a virtual user, who remembers the status of the application until the completion of a script-run und ggf. mit speziellen Testdaten versorgt.
- Monitore : an verschiedenen Stellen der Architektur (Messpunkte) werden Daten abgegriffen und ermöglichen eine Auswertung (Anzahl Threads, Prozessor-Auslastung, Laufzeiten, etc.)
Die bekannten Hersteller von Testtools ( Mercury International , IBM Rational , Compuware , um nur wenige zu nennen) warten mit einer Reihe von sehr komfortablen Funktionen auf. Die Testskripte werden in der laufenden Anwendung aufgezeichnet und in einer Skript-Sprache zur weiteren Bearbeitung dargestellt. Aufgezeichnet wird das Kommunikationsprotokoll, z.B. die HTTP-Requests bei einer klassischen Web-Applikation. Bereits hier ist it is important to note what protocol is used, since each tool only supports a limited range of protocols.
Load generators are controlled by a central station which enables the integration of additional computer to generate the load. This includes the automatic distribution of the test scripts heard on this computer. When planning load testing a sufficient sizing of the load generators, ensure that enough processing power available for each of the virtual users.
The monitors are not included and must be purchased in addition to the basic package. As for the logs is here: will, for the selection of a load test tools have made sure that all the architectural components covered by monitors.
The operation is usually very comfortable and also allows non-programmers to speed quickly. The disadvantage is the effect of the high costs incurred for the base application, additional monitors as well as the virtual user (depending on number).
For the alternative, the JUnit framework, there are no license costs. Waiting for this Framework is on with a comfortable user interface. The scripts are implemented in a development environment (eg Eclipse) in the Java programming language. They can not be recorded. However, there is the possibility to reuse test scripts of the module tests, so that the programming effort can be minimized. Another big difference is here: the scripts are not dependent on a communication protocol, but are a layer over it. This difference is an advantage, if the application using a fat client is served, the company boasts a less common protocol. This argument is weakened with time, as the tool vendor to enter into and expand the range of supported protocols.
as the load generator JUnitPerf is used. The test scenarios weren also created in the Java source code. A distribution to other computers is not supported and must be implemented by other means.
for monitoring is to operate a bit more effort. The duration of measurement should be made at least within the test scripts through a standardized logging. Standardized in the sense that a subsequent automatic analysis based on MS Excel, etc. facilitated. Additional data points are useful and should be placed with the support of the development in the application. To measure the system load, memory usage, etc. can for example, the System or Application Server Monitor can be used (if any OS / marched with any application server).
are In summary, the high cost to use commercially available tools, the small comforts and the manual Expenses when using Junit over. This effort is not to be underestimated, since it involves additional costs. Should not other factors that influence such as the protocols supported the decision, one can speak of a gut decision. It should be influenced but not by the optically very well designed tools commercially available. The quality of the JUnit approach is the first alternative, based on practical experience in every way.
0 comments:
Post a Comment