Jubula - one step from manual tester to automation
Jubula is a test automation tool that is not known to many testers in Russia. He came to our company with a project from Germany.
The program was developed by BREDEX GmbH and is free of charge. The developer indicates that Jubula is capable of testing applications in Swing, SWT / RCP / GEF, and JavaFX. A tester using Jubula does not need to know any of the programming languages, since testing is carried out by the black box method and does not require source code, which allows everyone to automate their test cases on their own.
After installing the application, everything is ready for use: a database for storing projects and AUT-Agent is configured (provides Jubula connection with the application under test).
To create a new project, select Test - New from the menu and fill in the fields. In AUT executable, select the path to the executable file to run the application under test.
Of course, for a large project in which several testers work, special settings for a centralized database will be required, which will store the created test cases for regression testing, with access for all users.
To test an application with Jubula, you need, in fact, the application itself with a graphical interface. The program already contains a set of the most necessary actions:
Jubula's test case creation is based on the keyword method . That is, creating a new test case, the user finds the necessary actions using words such as click, check, wait, etc., adds them to the test and assigns them the necessary parameters.
In addition, Jubula provides the ability to "record" the actions performed by the tester and replay them later. This method is not popular, although it is appropriate for quickly creating preconditions when, for example, you need to "get" to the desired window, in which checks will already be performed.
To create a test case, you can simply drag a step from the Test Case Browser to the workspace where your test suite is open. Several steps can be combined into a module(Refactor - Extract Test Case), which can later be used in different test cases. Changing the module will change the steps in all tests where it is used, you need to be careful with this. If the module is open in the workspace, it is easy to view all test cases where it is used by pressing F7. There are many more hotkeys in Jubula, which are very conveniently highlighted on a separate line in the Help section. In addition, in Help Contents using the search bar, you can find information of interest on any function of the program (in English).
Before creating test cases, you need to add all the graphical componentsused in the test. This is done easily with Object Mapping Mode, which is activated when the application is open. Hover over the desired object and press Ctrl + Shift + q. The object must be given a name and saved, then it can be selected in the Component Names box in the desired step.
Jubula allows you to create your own specific steps as needed . There are executeExternalCommand and invokeExternal (Method) actions for this. With their help scripts or .jar files are launched. Without knowledge of JAVA, creating your own teams will not work. In our project, the configuration engineer wrote several large .jar files that Jubula accesses via .bat, written in executeExternalCommand.
Let's consider an example of a module created in our project to compare the active window with an image stored on SVN. First, the name of the future .jpg file (StoreValue) is saved as a variable, in the standard takeScreenshotofActivWindow this name and the path where the new screenshot will be located are written, and then in the executeExternalCommand step, the .bat file is launched, where the images that we will compare and some parameters like image size and maximum permissible deviation in pixels. Through the same .bat file, the .jar is launched, which contains classes for comparing text, images, pdf and csv files. This internal kitchen is mainly needed only by those who set up Jubula for a project for the first time, or add something that was sorely lacking. When creating a test case, the tester takes a ready-made module (from us, for example,Compare Image), sets parameters and does not even know what is written in .bat, and even more so in .jar.
Jubula can interact with third party applications during testing. Our application generates reports in PDF and CSV formats. Through the application, you can open a report in Adobe Reader, Jubula will save it using keyboard shortcuts, give it a name that the tester has chosen in advance, and then compare it with the file saved to SVN in the manner described above through executeExternalCommand.
Test resultsshown in maximum detail, you can see all the input and output parameters. If the test fails at some step, then Jubula takes a screenshot of that moment, which you can refer to at any time (this feature can be disabled to save space). In addition, for a step with an error, in most cases, a Log-View is available, which briefly describes the essence of the error. Results can be automatically saved to the selected folder in XML / HTML format.
In order to determine the actions following the occurrence of an error , the Event_Handler is used - the so-called event handler. It can be configured depending on the type of error to continue, repeat (a specified number of times), exit, pause, etc. In the event handler, you can add a test step or several steps that must be performed in case of an error.
You can influence the choice of the next step using If-Then-Else , which is very convenient for repetitive actions with different parameters.
While-Do or Do-While Loop helps a lot if you need to βscrollβ to the desired value [Press βdownβ until the value β5β appears or vice versa, until the value is β5β, press βdownβ].
Naturally, Jubula has the ability to run night runs to enjoy the green checkmarks in front of your tests in the morning.
Jubula conducts the test as if the user was conducting it on his computer: he moves the cursor over the application windows, clicks on the keys, so for the purity of the experiment, you cannot move the mouse or touch the keyboard at this moment... And as experience shows, without even touching anything, the user is able to embarrass Jubula with one glance so that she cannot find the right button, or press it, or something else. Therefore, the best option would be to run Jubula on another machine. In our project, this is a remote machine, where everyone logs in as their user, but all his changes in Jubula become available to everyone else.
In our project, Jubula is integrated with Polarion, this allows you to view statistics of which tests passed or failed, which were not run at all in this run. For each individual test case, Polarion has a Test Records field, which displays the results of the last night runs in Jubula, their number can be set independently (up to 300). This feature helps you easily track which version a test stopped passing from if it was not monitored regularly.
One significant drawback of the program is the inability to rollback any change, the function "step back", "undo" or something similar is simply not there. The maximum that is possible is to close everything without saving the changes. But if you click "Save", that's it. In emergency cases, it is possible to restore the version of the project from a certain date, this is fraught with the fact that the changes made after that day will be lost forever.
Jubula is a really good program for automating tests written for a desktop application. If desired and the user has the skills, it allows you to check everything, and not only the GUI, but also the functionality from the server side. But this creation is really gentle, you need to find an approach to it, and then you can use it happily ever after!