qtest-js-api
v0.0.7
Published
qTest API for Automation report
Downloads
1
Readme
This library will support to update Automation Test report to qTest, the following functions: the class belong to the relevant object data of qTest, the following is the code sample:
sample.js /******** ******** ******** ******** ******** ******** / const base = require('../base'); const testruns = require('../testruns'); const testcycles = require('../testcycles'); const releases = require('../releases'); const builds = require('../builds');
async function main() { const baseAPI = new base('https://ABC.qtestnet.com'); await baseAPI.login('[email protected]', '12345678');
const testId = 36027448; const testName = 'Hello test'; const cycleId = '3295940';
// const testcyclesAPI = new testcycles('https://ABC.qtestnet.com', '28899'); // const searchCycle = await testcyclesAPI.get(cycleId);
const testrunsAPI = new testruns('https://ABC.qtestnet.com', '28899'); // const foundTestRun = await testrunsAPI.findAndCreateIfNotFound(testId, testName, cycleId, 'test-cycle'); // console.log(foundTestRun, foundTestRun.id, 'END');
const testrunId = 125406190; // const testLog = await testrunsAPI.createAutoTestLog(testrunId, testName + 'For logging'); // console.log(testLog, testLog.id, 'END');
const testLogId = 165766499; // 165328262 , 165766499
const updateLog = await testrunsAPI.updateAutoTestLog(testrunId, testLogId, 'Update the name by trial stepsß', 'PASS', 'Any Note from trying to update'); console.log(updateLog, updateLog.status);
}
main(); /******** ******** ******** ******** ******** ******** /