Einstein SDK
API SDK for Einstein according to Einstein SDK HTTP API
Installation
npm install einstein-sdk
APIs
Login
;// or use: const EinsteinSDK = require('einstein-sdk').default; const EINSTEIN_ENDPOINT = 'https://einstein.ringcentral.com';const einsteinSdk = EINSTEIN_ENDPOINT;await einsteinSdk;
Logout
einsteinSdk;
Get Projects
const projects = await einsteinSdk;
Get Project
const project = await einsteinSdk;
Get Suites
const suites = await einsteinSdk;
Get Test Cases
const testCase = await einsteinSdk;
Update Test Case
const testCase = await einsteinSDK;const parameter = id: testCaseid versionId: testCaseversionid name: ` new` summary: ` new` preconditions: ` new` priority: PRIORITY_ENUMP3 executionType: EXECUTION_TYPE_ENUMAutomated steps: ...testCasechildren name: 'step1' expectedResult: 'no result' execution: EXECUTION_TYPE_ENUMAutomated name: 'step2' expectedResult: 'no result2' execution: EXECUTION_TYPE_ENUMAutomated ;const response = await einsteinSDK;
Create Test Case
const data = projectId: $projectId parentId: $parentId name: 'Einstein SDK Test' priority: PRIORITY_ENUMP3 executionType: EXECUTION_TYPE_ENUMAutomated summary: 'This is summary.' preconditions: 'This is preconditions.' steps: name: 'Step 1' expectedResult: 'Expected result 1' execution: EXECUTION_TYPE_ENUMAutomated name: 'Step 2' expectedResult: 'Expected result 2' execution: EXECUTION_TYPE_ENUMAutomated name: 'Step 3' expectedResult: 'Expected result 3' execution: EXECUTION_TYPE_ENUMAutomated ;const response = await einsteinSDK;
Get Test Cases By Keyword Ids
const testCases = await einsteinSdk;
Get Test Plans
const testPlans = await einsteinSdk;
Create Test Plan
await einsteinSdk;
Add Test Case To Test Plans
await einsteinSdk;
Add Test Cases To Test Plan
await einsteinSDK;
Get Builds
const builds = await einsteinSdk;
Create Build
await einsteinSdk;
Add Value To Custom Field
await einsteinSdk;
Get Test Executions
const executions = await einsteinSdk;
Get Project Keywords
const keywords = await einsteinSdk;
Get Meta Data By Project Name
const metaData = await einsteinSdk;
Search Test Case In Test Suite Scope
const testCases = await einsteinSdk;
Search Test Case In Test Executions Scope
const testCases = await einsteinSdk;
Update test case properties
await einsteinSDK;
Get suggest test cases
const pattern = 'xxx';await einsteinSDK;
Fields For Searching Test Cases
Field | Keyword In Expression | Available Operators | Predefined Values | Available? |
---|---|---|---|---|
Project | project | = | n/a | ✅ |
Test plan | test_plan | =, in | n/a | ✅ |
Case Id | case_id | =, in | n/a | ✅ |
Case Name | case_name | like | n/a | ✅ |
Suite | suite | =, in | n/a | ✅ |
Suite Name | suite_name | like | n/a | ✅ |
Summary | summary | like | n/a | ✅ |
Preconditions | preconditions | like | n/a | ✅ |
Test Step | test_step | like | n/a | ✅ |
Expected Result | expected_result | like | n/a | ✅ |
Text | text | like | n/a | ✅ |
Priority | priority | =, in | "P0", "P1", "P2", "P3" | ✅ |
Execution Type | execution_type | =, in | "Manual", "Automated", "Automatable", "NotAutomatable", "ReadyForAutomation", "AutomationExpired", "AutomationSuspended" | ✅ |
Last Execution Status | last_execution_status | =, in | "Passed", "Failed", "Blocked", "Skipped", "NotApplicable", "NotRun" | ✅ |
Execution Status | execution_status | =, in | "Passed", "Failed", "Blocked", "Skipped", "NotApplicable", "NotRun" | ✅ |
Tested By | tested_by | =, in | n/a | ✅ |
Version | version | =, in | "Active", "Last" | ✅ |
Version Number | version_number | =, in | n/a | ✅ |
Created By | created_by | =, in | n/a | ✅ |
Date Created | date_created | <,<=,>,>= | n/a | ✅ |
Last Updated | last_updated | <,<=,>,>= | n/a | ✅ |
Date Update | date_updated | <,<=,>,>= | n/a | ✅ |
Updated By | updated_by | =, in | n/a | ✅ |
Req. Doc. Id (coverage) | document_id | like | n/a | ✅ |
Run | run | in | n/a | ✅ |
Custom Fields | @custom field name@ | in | n/a | ✅ |
Searching Expression Samples
Search Test Cases By Project Name Only
project = "RC Cloud Integration"
Search Test Cases By Project Name And Test Plan Name
project in "RC Cloud Integration" and test_plan = "Salesforce V3.41"project in "RC Cloud Integration" and test_plan in "Salesforce V3.41, Google&Office365 - V2.6.0"
Search Test Cases By Project Name And Test Case Id
project = "RC Cloud Integration" and case_id = "1286"project = "RC Cloud Integration" and case_id in "1286, 42"
Search Test Cases By Project Name And Test Case Name
project = "RC Cloud Integration" and case_name like "Log into RC CTI app with phone number/email"
Search Test Cases By Project Name And Suite Name (suite name can be a nested structure split by '.')
project = "RC Cloud Integration" and suite = "Firefox"project = "RC Cloud Integration" and suite in "Firefox, Skype for Business"project = "Ringcentral meetings" and suite = "SW - Settings/Reports/Dashboard.Meetings Report.Admin Portal.Webinar" and version = "Active"project = "RC Cloud Integration" and suite_name like "Firefox"
Search Test Cases By Project Name And Summary
project = "RC Cloud Integration" and summary like "To verify whether user is able to log into RC CTI"
Search Test Cases By Project Name And Preconditions
project = "RC Cloud Integration" and preconditions like "User must have RC CTI account"
Search Test Cases By Project Name And Test Step
project = "RC Cloud Integration" and test_step like "enter extension(optional) and password"
Search Test Cases By Project Name And Expected Result
project = "RC Cloud Integration" and expected_result like "Password entered, value is hidden"
Search Test Cases By Project Name And Text
project = "RC Cloud Integration" and text like "password"
Search Test Cases By Project Name And Priority
Optional values for priority: "P0", "P1", "P2", "P3"
project = "RC Cloud Integration" and priority = "P0"project = "RC Cloud Integration" and priority in "P0, P1, P2"
Search Test Cases By Project Name And Execution Type
Optional values for execution type: "Manual", "Automated", "Automatable", "NotAutomatable", "ReadyForAutomation"
project = "RC Cloud Integration" and execution_type = "Automated"project = "RC Cloud Integration" and execution_type in "Automated, Automatable"
Search Test Cases By Project Name And Last Execution Status
Optional values for last execution status: "Passed", "Failed", "Blocked", "Skipped", "NotApplicable", "NotRun"
project = "RC Cloud Integration" and last_execution_status = "Passed"project = "RC Cloud Integration" and last_execution_status in "Passed, Failed, Skipped"
Search Test Cases By Project Name And Execution Status
Optional values for execution status: "Passed", "Failed", "Blocked", "Skipped", "NotApplicable", "NotRun"
project = "RC Cloud Integration" and execution_status = "Passed"project = "RC Cloud Integration" and execution_status in "Passed, Failed, Skipped"
Search Test Cases By Tested By
project = "RC Cloud Integration" and tested_by = "yuki.chen"project = "RC Cloud Integration" and tested_by in "yuki.chen, klay.chen"
Search Test Cases By Project Name And Version
Optional values for version: "Active", "Last"
project = "RC Cloud Integration" and version = "Active"project = "RC Cloud Integration" and version in "Active, Last"
Search Test Cases By Project Name And Version Number
project = "RC Cloud Integration" and version_number = "21"project = "RC Cloud Integration" and version_number in "20, 21"
Search Test Cases By Created By
project = "RC Cloud Integration" and created_by = "yuki.chen"project = "RC Cloud Integration" and created_by in "yuki.chen, klay.chen"
Search Test Cases By Date Created
project = "RC Cloud Integration" and date_created >= "2019-04-01"project = "RC Cloud Integration" and date_created < "2019-04-01"
Search Test Cases By Updated By
project = "RC Cloud Integration" and updated_by = "yuki.chen"project = "RC Cloud Integration" and updated_by in "yuki.chen, klay.chen"
Search Test Cases By Last Updated
project = "RC Cloud Integration" and last_updated >= "2019-04-01"project = "RC Cloud Integration" and last_updated < "2019-04-01"
Search Test Cases By Document Id
project = "RC Cloud Integration" and document_id like "abc"
Search Test Cases By Project Name And Custom Fields
Wrapper custom field with "@" and "@".
project = "RC Cloud Integration" and @Keywords@ in "Salesforce, Outlook"project = "RC Cloud Integration" and @Automation@ in "Automatable, Automated"project = "RC Cloud Integration" and @Release Name@ in "Release_10.0, Release_10.1"
Search Test Cases By Run
project = "Ringcentral meetings" and run in "9.4 Meeings Dashboard Regression testing: 5.4 Mac Rooms" and version = "Active"
Search Test Cases Using "in", "or", "()" and "!'
or ((project = "RC Cloud Integration" and execution_type = "Automated"))
project = "RC Cloud Integration" and @Keywords@ in "Google" and priority="P0" and !
Important Notice
It's necessary to add version = "Active"
in every query expression.
More Information
See Test Cases for Einstein SDK to get more details.