npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

testlink-status-updater

v1.1.1

Published

Updates results in TestLink for use in a replacement tool

Downloads

2

Readme

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