testlink-status-updater

1.1.1 • Public • Published

Purpose

This tool can be used to generate a list of 100 test cases that can be imported into TestLink, and then automatically execute a number of those tests on a function call.

This allows engineers to use regression testing tools that don't suck while still allowing product mangers to refer to a single report in TestLink.

This tool has two functions: generateTestSuite, and updateResults

generateTestSuite

This function generates a TestLink test suite that can be imported into TestLink.

The command can be run in node:

const updater = require('testlink-status-updater')
console.log(updater.generateTestSuite({
  name: 'Test Results',
  details: 'Output of some tool used for reporting test results in TestLink',
  summary: 'A blank test representing a percentage of the total tests run'
}))

Parameters:

  • name The name of the test plan. This needs to be unique; TestLink probably won't know what to do with a name clash
  • details Optional text that provides a summary for the test suite
  • summary Optional text to show in each generated test case

This can also be run in the command line:

npm run generateTestSuite "Test Results"

To import a test plan into TestLink:

  1. Go to the TestLink homepage and select the Test Project you wish to add the test cases to
  2. Select Test Specification on the top bar
  3. Select a desired parent Test Suite folder
  4. In the right frame, click the cog and under Test Suite Operations, click the Import button
  5. Select the file you wish to import. It is crucial that under Action for duplicates, Update data on Latest version is selected. Otherwise extra garbage tests may get generated

To add tests to a Test Plan:

  1. Go to the TestLink homepage and select the Test Project you wish to add tests to
  2. On the right menu, select "Add / Remove Test Cases"
  3. Under the Settings section of the left frame, select the Test Plan to add tests to
  4. Select the tests that were uploaded earlier, and add all the tests (if prompted about removing execution status, click ok; the results are autogenerated)

updateResults

This function updates the results of the test cases created above in TestLink. It returns a promise.

const updater = require('testlink-status-updater')
updater.updateResults({
  devKey: 't3stL1nkD3vK3y',
  apiUrl: 'http://IP_ADDRESS:80/lib/api/xmlrpc/v1/xmlrpc.php',
  project: 'Clouds',
  plan: 'testing-test-plan',
  build: 'build specified',
  platform: 'Optional Platform',
  suite: 'Test Results',
  total: 9000,
  passed: 10,
  failed: 1,
  blocked: 0
})
.then(() => console.log('done'))

Parameters:

  • devKey A key generated for a particular user in TestLink. It can be found under "TestLink -> My Settings -> Personal API access key -> Generate a new key" in the web UI
  • apiUrl Some mysterious URL... honestly I don't even remember where I found it. Just replace IP_ADDRESS with the address you connect to to TestLink. Do not forget to add :80 to the end
  • project The name of the Testlink Project
  • plan The name of the Testlink Plan
  • build The name of the Testlink Build
  • platform optional only required if the test cases are part of a platform
  • suite The name of the Testlink Suite defined earlier with the generateTestSuite function
  • total The total number of actual tests
  • passed The number of tests out of the total that have passed
  • failed The number of failed tests
  • blocked The number of blocked tests

Readme

Keywords

none

Package Sidebar

Install

npm i testlink-status-updater

Weekly Downloads

3

Version

1.1.1

License

ISC

Unpacked Size

12 kB

Total Files

4

Last publish

Collaborators

  • jsweeney.dev