1.2.1 • Published 1 year ago

qtest_integration v1.2.1

Weekly downloads
-
License
Unlicensed
Repository
github
Last release
1 year ago

QTestHelper

Module that helps update test case execution results in QTest.

Installation

npm install qtest_integration

How to use

In before hook, call the setConfig Method

import qTestHelper from 'qtest_integration';



    before(() => {
      qTestHelper.setConfig({
        projectUrl , // Project url
        projectId,  // Project Id,
        auth       // Bearer Token
      });
    })

Alt text

In the after-each hook, call the executeTestRun command

 const payload =
        {
          description,   // Test case name
          testCasePid,   // Test case id, example 'TC-57'
          status,        // Valid value : PASSED | FAILED
          startTime,    // Start time
          error,        // Provide the error message if the status is FAILED [OPTIONAL]
          testSuiteId,   // Id of a test suite
          screenshot     // Provide the base64 encoded string of screenshot [OPTIONAL]
        };

        await qTestHelper.executeTestRun(payload);

Alt text Alt text

Use the below method if the test is not already present in QTest

 const payload =
        {
          testName,   // Test case name
          status,     // Valid value : PASSED | FAILED
          startTime,  // Start time
          error,      // Provide the error message if the status is FAILED [OPTIONAL]
          testSuiteId,   // Id of a test suite
          screenshot     // Provide the base64 encoded string of screenshot [OPTIONAL]
          errorOnDuplicate // Default: false.If true, the application will throw an exception if multiple testcases with the same name are present
          tempModuleName: // Name of the module inside which test will be created. Default: "Module created by Automation"
        };

        await qTestHelper.executeTestRunByName(payload);
1.2.1

1 year ago

1.1.13

2 years ago

1.1.12

2 years ago

1.1.11

2 years ago

1.1.10

2 years ago

1.1.9

2 years ago

1.1.8

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago