Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
api-testrail
Advanced tools
[![npm version](https://badge.fury.io/js/api-testrail.svg)](https://badge.fury.io/js/api-testrail) ![GitHub package.json version (branch)](https://img.shields.io/github/package-json/v/stepanchaparyan/testrailapi/master.svg) [![Build Status](https://travis
The TestRail API is described here
Of cource, you need to setup the API wrapper :
import ApiTestRail from 'api-testrail';
const testrail = new ApiTestRail(
host,
username,
password
);
Returns an existing test case
testrail.getCase (caseId) {
return /*case data*/;
}
Returns a list of test cases for a project
testrail.getCases(projectId) {
return /*all cases' data*/;
}
Returns a list of test cases IDs for a project and case type
testrail.getCasesIDsByType (projectId, typeId) {
return /*list of IDs*/;
}
Creates a new test case The following POST fields are supported: sectionID(required), title, prioretyID, typeID
testrail.addCase(sectionID, title = 'AutoCreatedTest', prioretyID = 2, typeID = 7) {
return /*added case's data*/;
}
Updates an existing test case (partial updates are supported, you can update only title, priority and type)
testrail.updateCase (caseID, title = 'AutoCreatedTest', priorityID = 2, typeID = 7) {
return /*updated case's data*/;
}
Deletes an existing test case
testrail.deleteCase (caseID) {
return /*statusID, i.e. 200*/;
}
Returns a list of available test case custom fields
testrail.getCaseFields () {
return /*case fields' list*/;
}
Returns a list of available case types
testrail.getCaseTypes () {
return /*case types' list*/;
}
Returns an existing milestone
testrail.getMilestone (milestoneID) {
return /*milestone's data*/;
}
Returns the list of milestones for a project
testrail.getMilestones (projectID) {
return /*list of milestones' data*/;
}
Creates a new milestone The following POST fields are supported - milestone's name and description
testrail.addMilestone (projectID, name = 'Milestone', description = '') {
return /*added milestone's data*/;
}
Updates an existing milestone (partial updates are supported, you can submit and update only - is_completed field)
testrail.updateMilestone (milestoneID, isCompleted) {
return /*updated milestone's data*/;
}
Deletes an existing milestone
testrail.deleteMilestone (milestoneID) {
return /*statusID, i.e. 200*/;
}
Returns an existing test plan
testrail.getPlan (planID) {
return /*test plan's data*/;
}
Returns the list of test plans for a project
testrail.getPlans (projectID) {
return /*list of test plans' data*/;
}
Creates a new test plan The following POST fields are supported - plan's name and description
testrail.addPlan (projectID, name = 'Plan', description = '') {
return /*added test plan's data*/;
}
Adds new test run to a test plan The following POST fields are supported - planID(required), suiteID(required), name
testrail.addPlanEntry (planID, suiteID, runName) {
return /*added test plan entry's data*/;
}
Updates an existing test plan Following fields are supported - plan's name and description
testrail.updatePlan (planID, name, description) {
return /*updated test plan's data*/;
}
Closes an existing test plan and archives its test runs & results
testrail.closePlan (planID) {
return /*closed test plan's data*/;
}
Deletes an existing test plan
testrail.deletePlan (planID) {
return /*statusID, i.e. 200*/;
}
Returns a list of available configurations, grouped by configuration groups
testrail.getConfigs (projectID) {
return /*list of configs*/;
}
Creates a new configuration group
testrail.addConfigGroup (projectID, name) {
return /*added configGroup data*/;
}
Creates a new configuration
testrail.addConfig (configGroupID, name) {
return /*added config data*/;
}
Updates an existing configuration group
testrail.updateConfigGroup (configGroupID, name) {
return /*updated configGroup data*/;
}
Updates an existing configuration
testrail.updateConfig (configID, name) {
return /*updated config data*/;
}
Deletes an existing configuration group and its configurations
testrail.deleteConfigGroup (configGroupID) {
return /*statusID, i.e. 200*/;
}
Deletes an existing configuration
testrail.deleteConfig (configID) {
return /*statusID, i.e. 200*/;
}
Returns a list of available priorities
testrail.getPriorities () {
return /*list of priorities*/;
}
Returns an existing project
testrail.getProject (projectID) {
return /*project's data*/;
}
Returns an existing projects The following filters can be applied: 1 to return completed projects only. 0 to return active projects only
testrail.getProjects (isCompleted = '') {
return /*projects' data*/;
}
Creates a new project (admin status required) The following POST fields are supported: name, announcement, showAnnouncement, suiteMode
testrail.addProject (name, announcement = '', showAnnouncement = true, suiteMode = 1) {
return /*added project's data*/;
}
Updates an existing project (admin status required) Only the following updates are supported - is_completed (true, false)
testrail.updateProject (projectID, isCompleted) {
return /*updated project's data*/;
}
Deletes an existing project (admin status required)
testrail.deleteProject (projectID) {
return /*statusID, i.e. 200*/;
}
Returns a list of test results for a test
testrail.getResults (testID) {
return /*list of test results for a test*/;
}
Returns a list of test results for a test run (except untested tests)
testrail.getResultsForRun (runID) {
return /*list of test results for a test run*/;
}
Returns a status of case
testrail.getResultForCase (runID, caseID) {
return /*status_id of test case*/;
}
Adds a new test result and/or comment for a test
testrail.addResult (testID, statusID, comment = ' ') {
return /*added result's data */;
}
Adds a new test result or comment for a case
testrail.addResultForCase (runID, caseID, statusID, comment = '') {
return /*added result's data */;
}
Returns a list of available test result custom fields
testrail.getResultFields () {
return /*list of test result fields*/;
}
Returns an existing test run
testrail.getRun (runID) {
return /*run's data*/;
}
Returns a list of test runs for a project. Only returns those test runs that are not part of a test plan The following filters can be applied: 1: 1 to return completed projects only. 0 to return active projects only 2: limit, 3: milestoneID, 4: suiteID
testrail.getRuns (projectID, isCompleted = '',limit = '', milestoneID = '', suiteID = '') {
return /*list of runs' data*/;
}
Creates a new test run
testrail.addRun (projectID, suiteID = 1) {
return /*added run's data*/;
}
Creates a new test run for specific case type and returns run ID
testrail.addRunWithType (projectID, typeID, suiteID = 1) {
return /*added run's id*/;
}
Updates an existing test run (partial updates are supported: runName and description)
testrail.updateRun (runID, name, description) {
return /*updated run's data*/;
}
Closes an existing test run and archives its tests & results
testrail.closeRun (runID) {
return /*closed run's data*/;
}
Deletes an existing test run
testrail.deleteRun (runID) {
return /*statusID, i.e. 200*/;
}
Returns an existing section
testrail.getSection (sectionID) {
return /*section's data*/;
}
Returns a list of sections for a project and test suite The ID of the test suite (optional if the project is operating in single suite mode, default is 1)
testrail.getSections (projectID, suiteID = 1) {
return /*lits of section's data*/;
}
Creates a new section The ID of the test suite is optional (default is 1) if the project is operating in single suite mode, required otherwise)
testrail.addSection (projectID, name, suiteID = 1, description) {
return /*added section's data*/;
}
Updates an existing section (partial updates are supported, i.e. you can submit and update specific fields only)
testrail.updateSection (sectionID, name, description) {
return /*updated section's data*/;
}
Deletes an existing section
testrail.deleteSection (sectionID) {
return /*statusID, i.e. 200*/;
}
Returns a list of available test statuses
testrail.getStatuses () {
return /*statuses list*/;
}
Returns an existing test suite
testrail.getSuite (suiteID) {
return /*suite's data*/;
}
Returns a list of test suites for a project
testrail.getSuites (projectID) {
return /*list of test suite's*/;
}
Creates a new test suite
testrail.addSuite (projectID, name, description) {
return /*added test suite's data*/;
}
Updates an existing test suite
testrail.updateSuite (suiteID, name, description) {
return /*updated test suite's data*/;
}
Deletes an existing test suite
testrail.deleteSuite (suiteID) {
return /*statusID, i.e. 200*/;
}
Returns a list of available templates
testrail.getTemplates (projectID) {
return /*list of templates*/;
}
Returns an existing test
testrail.getTest (testID) {
return /*test's data*/;
}
Return all tests for a test run Optional: Also a comma-separated list of status IDs to filter by
testrail.getTests (runId, typeID = [1,2,3,4,5]) {
return /*tests data*/;
}
Returns an existing user
testrail.getUser (userID) {
return /*user's data*/;
}
Returns a list of users
testrail.getUsers () {
return /*list of users*/;
}
Returns an existing user by his/her email address
testrail.getUserByEmail (email) {
return /*user's data*/;
}
Passed - 1
Blocked - 2
Untested - 3
Retested - 4
Failed - 5
Acceptance - 1
Accessibility - 2
Automated - 3
Compatibility - 4
Destructive - 5
Functional - 6
Other (Default) - 7
Performance - 8
Regression - 9
Security - 10
Smoke & Sanity - 11
Usability - 12
FAQs
[![npm version](https://badge.fury.io/js/api-testrail.svg)](https://badge.fury.io/js/api-testrail) ![GitHub package.json version (branch)](https://img.shields.io/github/package-json/v/stepanchaparyan/testrailapi/master.svg) [![Build Status](https://travis
The npm package api-testrail receives a total of 14 weekly downloads. As such, api-testrail popularity was classified as not popular.
We found that api-testrail demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.