Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dlenroc/testrail

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dlenroc/testrail

TestRail API client with error handling and typing

  • 1.4.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
10K
decreased by-62.28%
Maintainers
1
Weekly downloads
 
Created
Source

@dlenroc/testrail · NPM Version Supported Node.js version

Installation

npm install @dlenroc/testrail --save

Example

// import TestRail from '@dlenroc/testrail';
// const TestRail = require('@dlenroc/testrail');

const api = new TestRail({
    host: 'https://{organization}.testrail.net',
    username: '{username}',
    password: '{token/password}',
});

const projects = await api.getProjects();

console.log(projects);

APIs

Attachments

addAttachmentToCase(caseId: number, payload: AddAttachment): Promise<CreatedAttachment>
addAttachmentToPlan(planId: number, payload: AddAttachment): Promise<CreatedAttachment>
addAttachmentToPlanEntry(planId: number, entryId: string, payload: AddAttachment): Promise<CreatedAttachment>
addAttachmentToResult(resultId: number, payload: AddAttachment): Promise<CreatedAttachment>
addAttachmentToRun(runId: number, payload: AddAttachment): Promise<CreatedAttachment>
getAttachmentsForCase(caseId: number, filters?: Pagination): Promise<AttachmentForCase[]>
getAttachmentsForPlan(planId: number, filters?: Pagination): Promise<AttachmentForPlan[]>
getAttachmentsForPlanEntry(planId: number, entryId: string): Promise<AttachmentForPlanEntry[]>
getAttachmentsForRun(runId: number, filters?: Pagination): Promise<AttachmentForRun[]>
getAttachmentsForTest(testId: number): Promise<AttachmentForTest[]>
getAttachment(attachmentId: string): Promise<Blob>
deleteAttachment(attachmentId: string): Promise<void>

Cases

getCase(caseId: number): Promise<Case>
getCases(projectId: number, filters?: CaseFilters): Promise<Case[]>
getHistoryForCase(caseId: number, filters?: Pagination): Promise<CaseHistory[]>
addCase(sectionId: number, payload: AddCase): Promise<Case>
copyCasesToSection(sectionId: number, payload: CopyCasesToSection): Promise<void>
updateCase(caseId: number, payload: UpdateCase): Promise<Case>
updateCases(suiteId: number, payload: UpdateCases): Promise<void>
moveCasesToSection(sectionId: number, payload: MoveCasesToSection): Promise<void>
deleteCase(caseId: number): Promise<void>
deleteCases(suiteId: number, payload: DeleteCases): Promise<void>

Case Fields

getCaseFields(): Promise<CaseField[]>
addCaseField(payload: AddCaseField): Promise<CaseField>

Case Types

getCaseTypes(): Promise<CaseType[]>

Configurations

getConfigs(projectId: number): Promise<Config[]>
addConfigGroup(projectId: number, payload: AddConfigGroup): Promise<Config>
addConfig(configGroupId: number, payload: AddConfig): Promise<ConfigItem>
updateConfigGroup(configGroupId: number, payload: UpdateConfigGroup): Promise<Config>
updateConfig(configId: number, payload: UpdateConfig): Promise<ConfigItem>
deleteConfigGroup(configGroupId: number): Promise<void>
deleteConfig(configId: number): Promise<void>

Milestones

getMilestone(milestoneId: number): Promise<Milestone>
getMilestones(projectId: number, filters?: MilestoneFilters): Promise<Milestone[]>
addMilestone(projectId: number, payload: AddMilestone): Promise<Milestone>
updateMilestone(milestoneId: number, payload: UpdateMilestone): Promise<Milestone>
deleteMilestone(milestoneId: number): Promise<void>

Plans

getPlan(planId: number): Promise<Plan>
getPlans(projectId: number, filters?: PlanFilters): Promise<PlanItem[]>
addPlan(projectId: number, payload: AddPlan): Promise<Plan>
addPlanEntry(planId: number, payload: AddPlanEntry): Promise<PlanEntry>
addRunToPlanEntry(planId: number, entryId: string, payload: AddRunToPlanEntry): Promise<PlanEntry>
updatePlan(planId: number, payload: UpdatePlan): Promise<Plan>
updatePlanEntry(planId: number, entryId: string, payload: UpdatePlanEntry): Promise<PlanEntry>
updateRunInPlanEntry(runId: number, payload: UpdateRunInPlanEntry): Promise<PlanEntry>
closePlan(planId: number): Promise<Plan>
deletePlan(planId: number): Promise<void>
deletePlanEntry(planId: number, entryId: string): Promise<void>
deleteRunFromPlanEntry(runId: number): Promise<void>

Priorities

getPriorities(): Promise<Priority[]>

Projects

getProject(projectId: number): Promise<Project>
getProjects(filters?: ProjectFilters): Promise<Project[]>
addProject(payload: AddProject): Promise<Project>
updateProject(projectId: number, payload: UpdateProject): Promise<Project>
deleteProject(projectId: number): Promise<void>

Reports

getReports(projectId: number): Promise<Report[]>
runReport(reportTemplateId: number): Promise<ReportUrls>

Results

getResults(testId: number, filters?: ResultFilters): Promise<Result[]>
getResultsForCase(runId: number, caseId: number, filters?: ResultFilters): Promise<Result[]>
getResultsForRun(runId: number, filters?: ResultForRunFilters): Promise<Result[]>
addResult(testId: number, payload: AddResult): Promise<Result>
addResultForCase(runId: number, caseId: number, payload: AddResult): Promise<Result>
addResults(runId: number, payload: AddResults): Promise<Result[]>
addResultsForCases(runId: number, payload: AddResultsForCases): Promise<Result[]>

Result Fields

getResultFields(): Promise<ResultField[]>

Runs

getRun(runId: number): Promise<Run>
getRuns(projectId: number, filters?: RunFilters): Promise<Run[]>
addRun(projectId: number, payload: AddRun): Promise<Run>
updateRun(runId: number, payload: UpdateRun): Promise<Run>
closeRun(runId: number): Promise<Run>
deleteRun(runId: number): Promise<void>

Sections

getSection(sectionId: number): Promise<Section>
getSections(projectId: number, filters?: SectionFilters): Promise<Section[]>
addSection(projectId: number, payload: AddSection): Promise<Section>
moveSection(sectionId: number, payload: MoveSection): Promise<Section>
updateSection(sectionId: number, payload: UpdateSection): Promise<Section>
deleteSection(sectionId: number): Promise<void>

Shared steps

getSharedStep(stepId: number): Promise<SharedStep>
getSharedSteps(projectId: number, filters?: SharedStepFilters): Promise<SharedStep[]>
addSharedStep(projectId: number, payload: AddSharedStep): Promise<SharedStep>
updateSharedStep(stepId: number, payload: UpdateSharedStep): Promise<SharedStep>
deleteSharedStep(stepId: number, payload?: DeleteSharedStep): Promise<void>

Statuses

getStatuses(): Promise<Status[]>

Suites

getSuite(suiteId: number): Promise<Suite>
getSuites(projectId: number): Promise<Suite[]>
addSuite(projectId: number, payload: AddSuite): Promise<Suite>
updateSuite(suiteId: number, payload: UpdateSuite): Promise<Suite>
deleteSuite(suiteId: number): Promise<void>

Templates

getTemplates(projectId: number): Promise<Template[]>

Tests

getTest(testId: number): Promise<Test>
getTests(runId: number, filters?: TestFilters): Promise<Test[]>

Users

getUser(userId: number): Promise<User>
getCurrentUser(): Promise<User>
getUserByEmail(email: string): Promise<User>
getUsers(filters?: UserFilters): Promise<User[]>

Keywords

FAQs

Package last updated on 17 Sep 2021

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc