Attributes

These are attributes to mark classes and methods as Test Cases and Test Case Steps that can be executed by the Test Framework.

CleanupStepAttribute

Marks a method as clean-up step. Only one clean-up step can be present per test case. The clean-up step is a normal step, that gets reported as the last step of the test run. The clean-up step is always executed also in case any of the previous steps were aborted

Namespace: Progile.ATE.TestFramework Syntax:

[CleanupStep(
    Properties:
    [TestInput = string],
    [FlowDescription = string],
    [ExpectedResults = string],
    [ScreenShotsOnException = bool]
)]
public void MethodName(ITester t)

Parameters:

Parameter

Description

[TestInput]

Type: string

The test input which describes the stimuli that shall be done on the SUT. Will be displayed in the Test Input column in the test report in the portal.

[FlowDescription]

Type: string

Not used at the moment.

[ExpectedResults]

Type: string

The expected behaviour on the SUT based on the test input. Will be displayed in the Expected Results column in the test report in the portal.

If an expected result is provided, the test step is required to set a result (e.g. by calling t.Report.PassStep or .FailStep) otherwise an error will be raised. If no expected result is provided, the test step is passed by default (e.g. for preparatory steps).

[ScreenShotsOnException]

Type: boolean

Whether or not a screenshot shall be taken when the test step is Aborted by an exception (e.g. ElementNotFoundException). Default true.

PreconditionStepAttribute

Marks a method as precondition step. Only one precondition step can be present per test case. The precondition step is a normal step, that gets reported as the very first step (0) of the test run.

Namespace: Progile.ATE.TestFramework Syntax:

[PreconditionStep(
    Properties:
    [TestInput = string],
    [FlowDescription = string],
    [ExpectedResults = string],
    [ScreenShotsOnException = bool]
)]
public void MethodName(ITester t)

Parameters:

Parameter

Description

[TestInput]

Type: string

The test input which describes the stimuli that shall be done on the SUT. Will be displayed in the Test Input column in the test report in the portal.

[FlowDescription]

Type: string

Not used at the moment.

[ExpectedResults]

Type: string

The expected behaviour on the SUT based on the test input. Will be displayed in the Expected Results column in the test report in the portal.

If an expected result is provided, the test step is required to set a result (e.g. by calling t.Report.PassStep or .FailStep) otherwise an error will be raised. If no expected result is provided, the test step is passed by default (e.g. for preparatory steps).

[ScreenShotsOnException]

Type: boolean

Whether or not a screenshot shall be taken when the test step is Aborted by an exception (e.g. ElementNotFoundException). Default true.

SetupTestAttribute

Use this attribute to mark a method with the following signature that should be used as a setup method. The setup method is executed before the first actual test step is executed. This allows you to setup internal data structures etc. You cannot add to the test report from a method flagged with this attribute. If your setup was successful you have to return true and the test execution will start. In case you were not able to setup your data structures return false which will abort the test execution.

Namespace: Progile.ATE.TestFramework Syntax:

[SetupTest()]
public bool MethodName(ITester t)

TearDownTestAttribute

Use this attribute to mark a method with the following signature that should be used as a tear down method. The tear down method is executed after the last actual test step (including clean-up) was executed. This allows you to dispose internal data structures etc. You cannot add to the test report from a method flagged with this attribute. If your tear down was successful you have to return trueand the test execution will finish with a valid result. In case you were not able to dispose your data structures return false which will set the report to execution error. Be aware that you don't have to return false in case something went wrong because the engine will shutdown afterwards anyway. The runtime will make sure all memory is free'ed again. Use this with caution.

Namespace: Progile.ATE.TestFramework Syntax:

[TearDownTest()]
public bool MethodName(ITester t)

TestCaseAttribute

Marks a .net class as TestResults.io test case

Namespace: Progile.ATE.TestFramework Syntax:

[TearDownTest(
    int PlanRevision,
    Properties:
    [FailOnEngineError = bool],
    [Model = string]
)]
class TestCaseName

Parameters:

Parameter

Description

PlanRevision

Type: int

Sets the plan revision of the test plan from the portal corresponding to the automated test case. This is typically set automatically by the designer when creating the test case project.

[FailOnEngineError]

Type: bool

Determines whether the test case should be aborted if an error happens in the execution engine, e.g. a image that shall be searched could not be found. This should always be true. Default: true.

[Model]

Type: string

Not used at the moment.

TestStepAttribute

Marks a .net method as a TestResults.io test step.

Namespace: Progile.ATE.TestFramework Syntax:

[TestStep(
    int sequence,
    Properties:
    [TestInput = string],
    [FlowDescription = string],
    [ExpectedResults = string],
    [ScreenShotsOnException = bool]
)]
public void MethodName(ITester t)

Parameters:

Parameter

Description

sequence

Type: int

The step number (required) starting from 1. This will be updated by the designer based on the order of the other test steps in the Test Case.

[TestInput]

Type: string

The test input which describes the stimuli that shall be done on the SUT. Will be displayed in the Test Input column in the test report in the portal.

[FlowDescription]

Type: string

Not used at the moment.

[ExpectedResults]

Type: string

The expected behaviour on the SUT based on the test input. Will be displayed in the Expected Results column in the test report in the portal.

If an expected result is provided, the test step is required to set a result (e.g. by calling t.Report.PassStep or .FailStep) otherwise an error will be raised. If no expected result is provided, the test step is passed by default (e.g. for preparatory steps).

[ScreenShotsOnException]

Type: boolean

Whether or not a screenshot shall be taken when the test step is Aborted by an exception (e.g. ElementNotFoundException). Default true.

TestStepInteractiveAttribute

Marks a .net method as a TestResults.io test step that can require manual interaction

Namespace: Progile.ATE.TestFramework Syntax:

[TestStep(
    int sequence,
    double timeOutInMinutes,
    Properties:
    [TestInput = string],
    [FlowDescription = string],
    [ExpectedResults = string],
    [ScreenShotsOnException = bool]
)]
public void MethodName(ITester t)

Parameters:

Parameter

Description

sequence

Type: int

The step number (required) starting from 1. This will be updated by the designer based on the order of the other test steps in the Test Case.

timeOutInMinutes

Type: double

How long the test case execution shall wait for the manual interaction. After this timeout the test case is aborted.

[TestInput]

Type: string

The test input which describes the stimuli that shall be done on the SUT. Will be displayed in the Test Input column in the test report in the portal.

[FlowDescription]

Type: string

Not used at the moment.

[ExpectedResults]

Type: string

The expected behaviour on the SUT based on the test input. Will be displayed in the Expected Results column in the test report in the portal.

If an expected result is provided, the test step is required to set a result (e.g. by calling t.Report.PassStep or .FailStep) otherwise an error will be raised. If no expected result is provided, the test step is passed by default (e.g. for preparatory steps).

[ScreenShotsOnException]

Type: boolean

Whether or not a screenshot shall be taken when the test step is Aborted by an exception (e.g. ElementNotFoundException). Default true.

Last updated