This chapter will help you in optimizing your working techniques and avoid unnecessary steps when working with QF-Test.
The previous chapter describes the creation of several test-suites. As you can image the amount of test-suites will increase over time. You can get a better overview over them using a QF-Test project.
QF-Test projects show all involved test-suites in a very nice way. Furthermore projects automatically take care of propagating modifications to referring test-suites. You can find more information about projects at chapter 9.
In the previous chapter we described the concept of creating maintainable test-suites by utilizing procedures and variables within QF-Test. Normally people start recording very long sequences and splitting those into smaller parts or even procedures later. It is very hard to split up long sequences as you have really to walk through the whole one to find proper boundaries. Another disadvantage is that you cannot see parts which have already been implemented in existing test-cases or procedures.
Instead of that described workflow we recommend to plan the tests and their test-steps including procedures first. Then you can start recording procedure by procedure. We came to the conclusion that anticipatory recording and creation is very helpful especially for working in bigger teams. A typical workflow for creating those procedures looks like this:
An alternative approach of creating procedures is the automated creation provided by QF-Test. This concept is described in chapter 24.
QF-Test provides the standard library
qfs.qft which is
included per default in every test-suite.
This suite contains many useful procedures for accessing components, the file system or a database. Please take a look at that library before you begin implementing something that has already been solved by us.
QF-Test records new components in the test-suite where you press the 'Stop recording' button. Therefore it could happen that you record components in the wrong test-suite.
If you want to move those components into another test-suite you must always use »File«-»Import« from the target suite. Take care to ensure that both suites belong to the same project or to specify correct ''Include files''/''Dependencies' relations in those test-suites. This workflow is described in detail in section 23.2.
3.1+ For cleaning your component structure in a test-suite you can first import the test-suite into itself. Then you can select the 'Windows and components' step, open the context menu via a right mouse-click and click at »Mark unused components...«. You will get a list of all components which are not used in the project. If you are sure that those components can be removed, then select the »Remove unused components« in the context menu of the 'Windows and components' step.
Note As soon as a Component's comment contains any text it is considered used, even if it has no references.
Several workflows can be followed to extend existing test-suites:
If you extend testsuites directly via clicking at 'Stop recording' in that suite, then you have to care about the recorded components. In case you have changed the recorded component hierarchy under 'Windows and components' the newly recorded components will be recorded in the normal hierarchy again and you have to move the new components to the optimized hierarchy. Another aspect is that it could become very difficult for moving single components into another test-suite under the right location there.
If you work in a scratch suite you can create the new test-steps temporarily in a completely new test-suite and import the recorded components and the created procedures and test-cases into the target suites together.
A detailed workflow for extending a test-suite from level 1 (from section 33.4) could look as follows:
A more detailed description of working in multiple test-suite can be found in chapter 23.
The script editor of QF-Test contains some fancy features to avoid too much typing actions.
If you want to call methods of the run-context
rc, you can simply type
rc. and press [Ctrl-Space], then you will
get a list of all available methods.
The auto-completion is also working for several variable names, which are:
|Table 34.1: List of variables with auto-completion.|
|Last update: 6/9/2022|
Copyright © 1999-2022 Quality First Software GmbH