Show / Hide Table of Contents

Class TestCase

A TestCase contains one or several test steps, these steps will be run one after another.

Inheritance
Object
TestCase
TestCaseApp
TestCaseWeb
Namespace: AxaFrance.WebEngine
Assembly: AxaFrance.WebEngine.dll
Syntax
[Serializable]
public abstract class TestCase

Properties

| Edit this page View Source

Context

The context object for the test case. For Web test using Selenium WebDriver, the Context will be an WebDrive object.

Declaration
public object Context { get; set; }
Property Value
Type Description
Object
| Edit this page View Source

ContextValues

The context of the current test case, which stores variables and values to be shared between different actions within the same test case.

Declaration
public List<Variable> ContextValues { get; protected set; }
Property Value
Type Description
List<Variable>
| Edit this page View Source

Information

Test Information. to privide more detailed information during test execution. This information can be visualized in the test report.

Declaration
public StringBuilder Information { get; }
Property Value
Type Description
StringBuilder
| Edit this page View Source

Name

The name of the test case. this name will be shown to users.

The Name is a required parameter to be assigned before the call of Run() or BeginRun() Method

Declaration
public string Name { get; set; }
Property Value
Type Description
String
| Edit this page View Source

StartDate

The DateTime value which the Test case has been started.

Declaration
public static DateTime StartDate { get; protected set; }
Property Value
Type Description
DateTime
| Edit this page View Source

TestCaseLogDir

The directory of the log of TestCase. The test script can use this directory to store personalised data.

Declaration
public string TestCaseLogDir { get; }
Property Value
Type Description
String
| Edit this page View Source

testCaseReport

This is the TestCase report which will be updated during test.

Declaration
protected TestCaseReport testCaseReport { get; set; }
Property Value
Type Description
TestCaseReport
| Edit this page View Source

TestCaseResult

The overall result of the current Test Case. if any of step fails, then the overall test case is failed.

Declaration
public Result TestCaseResult { get; set; }
Property Value
Type Description
Result
| Edit this page View Source

TestData

The test data (a list of named values) used for the current test case. Test Data is initialized from TestSuiteData by its name.

Declaration
public TestData TestData { get; }
Property Value
Type Description
TestData
| Edit this page View Source

TestSteps

The test steps to be run sequentially

Declaration
public TestStep[] TestSteps { get; set; }
Property Value
Type Description
TestStep[]
| Edit this page View Source

UniqueId

[Optional] The uniqueId of the current test case. This id if provided can be used as a key to associate test case and the key in your test management system.

Declaration
public string UniqueId { get; set; }
Property Value
Type Description
String

Methods

| Edit this page View Source

Cleanup()

cleanup the context of the test case

Declaration
public abstract string Cleanup()
Returns
Type Description
String

Detailed information about the clean up

| Edit this page View Source

GetReport()

Updates the information of test case execution to the associated TestCase Report.

Declaration
public TestCaseReport GetReport()
Returns
Type Description
TestCaseReport
| Edit this page View Source

Initialize()

Initialize the context of the test case

Declaration
public abstract void Initialize()
| Edit this page View Source

Run(TestCaseReport, Boolean)

This method will be called to run the current Test. Run calls automatically Initialize and Cleanup.

Declaration
public virtual Result Run(TestCaseReport report, bool Pause = false)
Parameters
Type Name Description
TestCaseReport report

The testcase report object initiaized by the test framework. After the test execution, use GetReport() method to get a valorized report.

Boolean Pause

True: When a test case ends or error encounters, the test execution will be paused until user presses Enter key

False: do not pause after each test (Default Value)

Returns
Type Description
Result

The test Result of test case

Remarks

When running automated test with IC or remote mode, do not assign Pause = True

  • Edit this page
  • View Source
In this article
Back to top Copyright ® 2016-2024 AXA France, All rights reserved.