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

node-testrail-sync

v0.0.3

Published

A synchronous API wrapper for TestRail

Downloads

13,240

Readme

Node-TestRail-Sync

"npm badge"

Node-TestRail-Sync is a synchronous api wrapper for TestRail, which is based on Node-TestRail. It contains an easy way to interact with all of the API commands for version 2 of the testrail API.

http://docs.gurock.com/testrail-api2/start

Note: It is also possible to use it async with callbacks, but all parameters have to be passed.

How to use (Examples)

var TestRail = require("node-testrail")

var testrail = new TestRail("https://example.testrail.com/", "[email protected]", "password")


//ASYNC
testrail.addResult(TEST_ID, STATUS_ID, COMMENT, VERSION, ELAPSED_TIME, DEFECTS, ASSIGNEDTO_ID, function(body) {
    console.log(body)
})
//SYNC
var resultResponse = testrail.addResult(TEST_ID, STATUS_ID, COMMENT)
console.log(resultResponse)


//ASYNC
testrail.getUserByEmail(EMAIL, function(user) {
    console.log(user)
})
//SYNC
var user = testrail.getUserByEmail(EMAIL)
console.log(user)


//ASYNC
testrail.getTest(TEST_ID, function(test) {
    console.log(test)
})
//SYNC
var test = testrail.getTest(TEST_ID)
console.log(test)

All the helper functions can be found under src within testrail.coffee

Available Commands

#####CASES

getCase(case_id, callback)

getCases(project_id, suite_id, section_id, callback)

addCase(section_id, title, type_id, project_id, estimate, milestone_id, refs, callback)

updateCase(case_id, title, type_id, project_id, estimate, milestone_id,refs, callback)

deleteCase(case_id, callback)

#####Case FIELDS getCaseFields(callback)

#####Case TYPES getCaseTypes(callback)

#####Configurations getConfigs(project_id, callback)

#####Milestones getMilestone(milestone_id, callback)

getMilestones(project_id, callback)

addMilestone(project_id, name, description, due_on, callback)

updateMilestone(milestone_id, name, description, due_on, is_completed, callback)

deleteMilestone(milestone_id, callback)

#####PLANS getPlan(plan_id, callback)

getPlans(project_id, callback)

addPlan(project_id, name, description, milestone_id, callback)

addPlanEntry(plan_id, suite_id, name, assignedto_id, include_all, callback)

updatePlan(plan_id, name, description, milestone_id,callback)

updatePlanEntry(plan_id, entry_id, name, assignedto_id, include_all, callback)

closePlan(plan_id, callback)

deletePlan(plan_id, callback)

deletePlanEntry(plan_id, entry_id, callback)

#####PRIORITIES getPriorities(callback)

#####PROJECTS getProject(project_id, callback)

getProjects(callback)

addProject(name,announcement,show_announcement, callback)

updateProject(project_id, name, announcement, show_announcement, is_completed, callback)

deleteProject(project_id, callback)

#####RESULTS getResults(test_id, callback, limit)

getResultsForCase(run_id, case_id, limit, callback)

addResult(test_id, status_id, comment, version, elapsed, defects,assignedto_id, callback)

addResults(run_id, results, callback)

addResultForCase(run_id, case_id, status_id, comment, version, elapsed,defects, assignedto_id, callback)

addResultsForCases(run_id, results, callback)

#####RESULT FIELDS getResultFields(callback)

#####RUNS getRun(run_id, callback)

getRuns(run_id, callback)

addRun(projectID,suite_id,name,description, milestone_id, callback)

updateRun(runID,name,description, callback)

closeRun(run_id,callback)

deleteRun(run_id,callback)

#####STATUSES getStatuses(callback)

#####SECTIONS getSection(section_id, callback)

getSections(project_id, suite_id, callback)

addSection(project_id, suite_id, parent_id, name,  callback)

updateSection(section_id, name, callback)

deleteSection(section_id, callback)

#####SUITES getSuite(suite_id, callback)

getSuites(project_id, callback)

addSuite(project_id,name, description, callback)

updateSuite(suite_id,name, description, callback)

deleteSuite(suite_id, callback)

#####TESTS getTest(test_id, callback)

getTests(run_id, callback)

#####USERS getUser(user_id, callback)

getUserByEmail(email, callback)

Thank you for using this module and feel free to contribute.

License

MIT