{"id":24518014,"url":"https://github.com/getdutchie/test_rail_dart","last_synced_at":"2025-04-14T09:43:07.021Z","repository":{"id":42481438,"uuid":"416556708","full_name":"GetDutchie/test_rail_dart","owner":"GetDutchie","description":"TestRail Dart API Wrapper","archived":false,"fork":false,"pushed_at":"2022-04-03T22:49:46.000Z","size":55,"stargazers_count":3,"open_issues_count":1,"forks_count":2,"subscribers_count":46,"default_branch":"main","last_synced_at":"2025-03-27T23:04:26.931Z","etag":null,"topics":["dart"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GetDutchie.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-10-13T01:59:54.000Z","updated_at":"2024-04-21T08:03:02.000Z","dependencies_parsed_at":"2022-09-06T19:12:10.897Z","dependency_job_id":null,"html_url":"https://github.com/GetDutchie/test_rail_dart","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GetDutchie%2Ftest_rail_dart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GetDutchie%2Ftest_rail_dart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GetDutchie%2Ftest_rail_dart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GetDutchie%2Ftest_rail_dart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GetDutchie","download_url":"https://codeload.github.com/GetDutchie/test_rail_dart/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248856192,"owners_count":21172710,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dart"],"created_at":"2025-01-22T01:37:33.483Z","updated_at":"2025-04-14T09:43:06.993Z","avatar_url":"https://github.com/GetDutchie.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Dutchie Logo](https://dutchie.com/favicons/default/apple-touch-icon.png)\n\n# Test Rail Dart\n\nThis package is a thin wrapper around the TestRail API that will allow for automated test reporting in Dart. It enables a user to start, report case pass/fail, and close your test runs from a Dart interface.\n\n## Getting Started\n\nInitialize the TestRail instance using the config method:\n\n```dart\nTestRail.config(\n  username: 'USERNAME',\n  password: 'PASSWORD',\n  /// The url that points to the test rail server =\u003e https://example.testrail.com\n  serverDomain: 'https://YOUR_SERVER.testrail.com',\n)\n```\n\n## Usage\n\n### Create Test case\n```dart\n/// Create new test case in section\nfinal createdTestCase = await TestCase.create(\n  // Replace with your own sectionId\n  1,\n  title: 'Test case from API',\n  customValues: \u003cString, dynamic\u003e{\n    // Custom fields start with \"custom_\" prefix\n    'custom_feedback': 'This case should be tested last',\n  },\n);\n```\n\n### Delete Test case\n```dart\n/// Get TestCase by ID\nfinal testCase = await TestCase.get(1);\n\nawait testCase.delete();\n```\n\n### Create or Update Runs\n\n```dart\n/// Start by creating a new run\nfinal newRun = await TestRun.create(\n  name: 'Test execution',\n  projectId: 1,\n);\n\n/// Add cases to the run\nawait newRun.updateRun(\n  caseIds: [1, 2, 3, 5],\n);\n```\n\nOnce the run is created, results can be reported by case:\n\n```dart\nfinal result = await newRun.addResultForCase(\n  caseId: 1,\n  statusId: 1,\n);\n\n// Optionally add a screenshot or other image to the result\nawait result.addAttachment(\n  '/workspace/attachments/failure.png',\n);\n```\n\n### Get\n\nHistorical runs, cases, and sections can be retrieved:\n\n```dart\nfinal testCase = await TestCase.get(1);\n\nfinal testCases = await TestCase.getAll(1);\n\nfinal testRun = await TestRun.get(1);\n\nfinal testSection = await TestSection.get(1);\n\nfinal testCaseHistory = await TestCaseHistory.get(1);\n```\n\nCompleted or ongoing test run results can be retrieved:\n\n```dart\nfinal caseResults = await TestResult.getCaseResults(\n  // Case ID is from TestCases, not TestRun\n  184234,\n  runId: 1833,\n);\n\nfinal runResults = await TestResult.getRunResults(\n  1818,\n  statusId: [5, 1],\n);\n\nfinal testResults = await TestResult.getTestResults(\n  // Test ID from particular TestRun\n  1868150,\n);\n```\n\n## About Dutchie\n\nWe’re not just building the future of shopping for cannabis, we’re building a culture of innovation, customer care, and challenge to the status quo.\n\nInspired? Join our team of [Dart and Flutter developers](https://dutchie.com/careers) today","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetdutchie%2Ftest_rail_dart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgetdutchie%2Ftest_rail_dart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetdutchie%2Ftest_rail_dart/lists"}