Methods
(static) add(suiteDataopt) → {string}
Adds a new test suite.
Example
import {SideeX} from "@sideex/api"
var sideex = new SideeX();
console.log(sideex.file.testSuite.add());
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
suiteData |
object |
<optional> |
Details of the test suite. |
Returns:
suiteIdString - Id of the test suite. suiteIdString
- Type
- string
(static) close(suiteIdStrings)
Closes test suites.
Example
import {SideeX} from "@sideex/api"
var sideex = new SideeX();
sideex.file.testSuite.add();
console.log(sideex.file.testSuite.getSuitesOrder());
sideex.file.testSuite.close("suite-0");
console.log(sideex.file.testSuite.getSuitesOrder());
Parameters:
Name | Type | Description |
---|---|---|
suiteIdStrings |
Array.<string> | Ids of the test suites. |
(static) closeAll()
Closes all of the test suites.
Example
import {SideeX} from "@sideex/api"
var sideex = new SideeX();
sideex.file.testSuite.add();
sideex.file.testSuite.add();
console.log(sideex.file.testSuite.getSuitesOrder());
sideex.file.testSuite.closeAll();
console.log(sideex.file.testSuite.getSuitesOrder());
(static) copy(suiteIdStringsopt)
Copies a test suite.
Example
import {SideeX} from "@sideex/api"
var sideex = new SideeX();
sideex.file.testSuite.add();
sideex.file.testSuite.copy("suite-0");
console.log(sideex.file.testSuite.getSuitesOrder());
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
suiteIdStrings |
Array.<string> |
<optional> |
selectedSuitesId
|
Ids of the test case to be copied and pasted |
(static) get(suiteIdString) → {object}
Gets the detail of a test suite.
Example
import {SideeX} from "@sideex/api"
var sideex = new SideeX();
sideex.file.testSuite.add();
sideex.file.testSuite.get("suite-0");
Parameters:
Name | Type | Description |
---|---|---|
suiteIdString |
string | Id of the test suite |
Returns:
suiteData - Details of the test suite. suiteData
- Type
- object
(static) getSelected() → {Array.<string>}
Gets the selected test suites.
Example
import {SideeX} from "@sideex/api"
var sideex = new SideeX();
sideex.file.testSuite.add();
sideex.file.testSuite.setSelected("suite-0");
console.log(sideex.file.testSuite.getSelected());
Returns:
suiteIdStrings - Ids of the test suites. suiteIdStrings
- Type
- Array.<string>
(static) getSuiteIdText(suiteName) → {string}
Gets the test suite id by its name.
Parameters:
Name | Type | Description |
---|---|---|
suiteName |
string | Name of the test suite |
Returns:
suiteIdString - Id of the test suite. suiteIdString
- Type
- string
(static) getSuitesOrder() → {Array.<string>}
Gets the test suites' order.
Example
import {SideeX} from "@sideex/api"
var sideex = new SideeX();
sideex.file.testSuite.add();
sideex.file.testSuite.add();
console.log(sideex.file.testSuite.getSuitesOrder());
Returns:
suiteIdStrings - Ids of the test suites. suiteIdStrings
- Type
- Array.<string>
(static) load(jsonString)
Loads the file for playback.
Example
import {SideeX} from "@sideex/api"
var sideex = new SideeX();
sideex.recorder.start();
//record commands.
sideex.recorder.stop();
//you have to have a test suite first, or just record one.
let jsonString = sideex.file.testSuite.save();
sideex.file.testSuite.load(jsonString);
sideex.playback.start();
Parameters:
Name | Type | Description |
---|---|---|
jsonString |
string | String of the JSON object. |
(static) rename(suiteIdString, newSuiteName) → {string}
Renames a test suite.
Parameters:
Name | Type | Description |
---|---|---|
suiteIdString |
string | Id of the test suite. |
newSuiteName |
string | New name for the test suite |
Returns:
newSuiteName - New name for the test suite
- Type
- string
(static) save() → {string}
Saves the file.
Example
import {SideeX} from "@sideex/api"
var sideex = new SideeX();
//you have to have a test suite first, or just record one.
let jsonString = sideex.file.testSuite.save();
sideex.file.testSuite.load(jsonString);
sideex.playback.start();
Returns:
- String of the JSON object
- Type
- string
(static) setSelected(suiteIdStrings)
Changes the selected test suites.
Example
import {SideeX} from "@sideex/api"
var sideex = new SideeX();
sideex.file.testSuite.add();
sideex.file.testSuite.setSelected("suite-0");
console.log(sideex.file.testSuite.getSelected());
Parameters:
Name | Type | Description |
---|---|---|
suiteIdStrings |
Array.<string> | Ids of the test suites. |
Type Definitions
jsonString
jsonString
- String of the JSON object
Type:
- string
selectedSuitesId
selectedSuitesId
- The test suites id that are currently selected
Type:
- Array.<string>
suiteData
Properties:
Name | Type | Description |
---|---|---|
suiteData.filename |
string | Filename of the test suite |
suiteData.title |
string | Ttitle of the test suite |
suiteData.cases |
Array.<string> | The test cases in the test suite |
suiteData.modified |
boolean | Is this test suite modified |
suiteData.status |
string | Status of the test suite |
suiteData
- Details of the test suite.
Type:
- object
suiteIdString
suiteIdString
- Id of the test suite”
Type:
- string
suiteIdStrings
suiteIdStrings
- Id of the test suites”
Type:
- Array.<string>