Methods
(static) add(caseDataopt) → {string}
Adds a new test case.
Example
import {SideeX} from "@sideex/api"
var sideex = new SideeX();
sideex.file.testSuite.add();
sideex.file.testCase.add();
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
caseData |
object |
<optional> |
Details of the test case. |
Returns:
caseIdString - Id of the test case. caseIdString
- Type
- string
(static) copy(srcCaseIdStringsopt, dstSuiteIdStringopt)
Copy the test case.
Example
import {SideeX} from "@sideex/api"
var sideex = new SideeX();
sideex.file.testSuite.add();
sideex.file.testCase.add();
sideex.file.testCase.copy("case-0", "suite-0");
console.log(sideex.file.testCase.getCasesOrder());
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
srcCaseIdStrings |
Array.<string> |
<optional> |
selectedCasesId
|
Id of the source test case where the test case will be cut. |
dstSuiteIdString |
string |
<optional> |
selectedSuiteId
|
Id of the destination test suite where the test case will be pasted. |
(static) cut(srcCaseIdStringsopt, dstSuiteIdStringopt)
Cuts a command from a test case and paste onto another test case.
Example
import {SideeX} from "@sideex/api"
var sideex = new SideeX();
sideex.file.testSuite.add();
sideex.file.testCase.add();
sideex.file.testCase.cut("case-0", "suite-0");
console.log(sideex.file.testCase.getCasesOrder());
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
srcCaseIdStrings |
Array.<string> |
<optional> |
selectedCasesId
|
Id of the source test case where the test case will be cut. |
dstSuiteIdString |
string |
<optional> |
selectedSuiteId
|
Id of the destination test suite where the test case will be pasted. |
(static) get(caseIdString) → {object}
Get the details of the test case.
Example
import {SideeX} from "@sideex/api"
var sideex = new SideeX();
sideex.file.testSuite.add();
sideex.file.testCase.add();
console.log(sideex.file.testCase.get("case-0"));
Parameters:
Name | Type | Description |
---|---|---|
caseIdString |
string | The id of test case. |
Returns:
caseData - The detail of test case. caseData
- Type
- object
(static) getCaseIdText(caseName, suiteIdStringopt) → {string}
Get id by test case name.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
caseName |
string | The name of test case. |
||
suiteIdString |
string |
<optional> |
selectedSuiteId
|
The id of test suite. |
Returns:
caseIdString - The id of test case. caseIdString
- Type
- string
(static) getCasesOrder() → {Array.<string>}
Gets the test cases' order.
Example
import {SideeX} from "@sideex/api"
var sideex = new SideeX();
sideex.file.testSuite.add();
sideex.file.testCase.add();
sideex.file.testCase.add();
console.log(sideex.file.testCase.getCasesOrder());
Returns:
caseIdStrings - Id of the test cases. caseIdStrings
- Type
- Array.<string>
(static) getSelected() → {Array.<string>}
Gets the currently selected commands.
Example
import {SideeX} from "@sideex/api"
var sideex = new SideeX();
sideex.file.testSuite.add();
sideex.file.testCase.add();
sideex.file.testCase.setSelected("case-0");
console.log(sideex.file.testCase.getSelected());
Returns:
caseIdStrings - Id of the test cases. caseIdStrings
- Type
- Array.<string>
(static) remove(caseIdString)
Removes a test case.
Example
import {SideeX} from "@sideex/api"
var sideex = new SideeX();
sideex.file.testSuite.add();
sideex.file.testCase.add();
sideex.file.testCase.add();
sideex.file.testCase.remove("case-0");
console.log(sideex.file.testCase.getCasesOrder());
Parameters:
Name | Type | Description |
---|---|---|
caseIdString |
string | Id of the test case. |
(static) rename(caseIdString, newCaseName) → {string}
Renames a test case.
Example
import {SideeX} from "@sideex/api"
var sideex = new SideeX();
sideex.file.testSuite.add();
sideex.file.testCase.add();
console.log(sideex.file.testCase.rename("case-0", "sideex"));
console.log(sideex.file.testCase.get("case-0"));
Parameters:
Name | Type | Description |
---|---|---|
caseIdString |
string | Id of the test case. |
newCaseName |
string | New name for the test case |
Returns:
newCaseName - New name for the test case
- Type
- string
(static) setSelected(caseIdStrings)
Changes the selected test cases.
Example
import {SideeX} from "@sideex/api"
var sideex = new SideeX();
sideex.file.testSuite.add();
sideex.file.testCase.add();
sideex.file.testCase.setSelected("case-0");
console.log(sideex.file.testCase.getSelected());
Parameters:
Name | Type | Description |
---|---|---|
caseIdStrings |
Array.<string> | Id of the test cases. |
Type Definitions
caseData
Properties:
Name | Type | Description |
---|---|---|
caseData.title |
string | Title of the test case |
caseData.commands |
Array.<string> | Commands of the test case |
caseData.suiteIdString |
string | The suite id where it belongs to |
caseData.modified |
boolean | Is this case modified |
caseData.status |
string | Status of the test case |
caseData
- Details of the test case
Type:
- object
caseIdString
caseIdString
- Id of the test case
Type:
- string
caseIdStrings
caseIdStrings
- Id of the test cases
Type:
- Array.<string>
selectedCasesId
selectedCasesId
- The test cases id that is currently selected
Type:
- Array.<string>
selectedSuiteId
selectedSuiteId
- The test suite id that is currently selected
Type:
- string
suiteIdString
suiteIdString
- Id of the test suite
Type:
- string