Project Item¶
Locations: | document root |
---|---|
Nested items: | Matrix , Testcase |
Properties: | name , references ,
workingDirectory |
Detailed Description¶
A Project
item represents a collection of of test cases. Test cases can be
defined in two ways:
in-line
Usually used for a bunch of trivial test cases with only few lines or if complex test cases are instantiated multiple times with slightly different configuration.
The test cases are executed in undefined order.
Example in-line project:
Project { name: "inline-project" Testcase { name: "trivial-1" function run() { // Qst.verify(...) } } // Assuming that ComplexTestcase.qml exists in the current // directory ComplexTestcase { name: "complex-1"; config: "something" } ComplexTestcase { name: "complex-2"; config: "something-else" } }as references
Usually used in non-trivial projects. Test cases are defined in their own files and then referenced by the main project file. Any property
prop
attached to the project item is available in sub-items asproject.prop
.The execution order is defined by their occurrence order in the
references
item.Example references project:
Project { name: "referencing-project" property string someProperty: "sometext" // someProperty is available in all test cases as // project.someProperty references: [ "testcase1.qml", "testcase2.qml" ] }
Properties¶
-
stringlist
references
¶ Default: empty list A list of files containing test cases. Test cases are executed in the specified order. Paths are relative to the project file unless an absolute path is provided:
references : [ "testcase-1.qml", // Path relative to the project file "/path/to/testcase-2.qml" // Absolute file path ]