{"id":18330204,"url":"https://github.com/krishnapollu/azure-devops-testplan-java-sdk","last_synced_at":"2025-09-04T17:36:09.547Z","repository":{"id":186383333,"uuid":"675092530","full_name":"krishnapollu/azure-devops-testplan-java-sdk","owner":"krishnapollu","description":"SDK to integrate your automated test results to Azure DevOps Test Plan","archived":false,"fork":false,"pushed_at":"2024-01-21T21:57:36.000Z","size":32,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-23T01:46:45.910Z","etag":null,"topics":["azure-devops","azure-testplan","sdk","test-automation"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/krishnapollu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-05T18:45:16.000Z","updated_at":"2023-08-08T05:00:24.000Z","dependencies_parsed_at":"2024-11-05T19:27:49.686Z","dependency_job_id":"3d08e5ff-f84e-4208-849a-a4b6c2d4e8ca","html_url":"https://github.com/krishnapollu/azure-devops-testplan-java-sdk","commit_stats":null,"previous_names":["krishnapollu/azure-testplan-sdk","krishnapollu/azure-devops-testplan-java-sdk"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/krishnapollu/azure-devops-testplan-java-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krishnapollu%2Fazure-devops-testplan-java-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krishnapollu%2Fazure-devops-testplan-java-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krishnapollu%2Fazure-devops-testplan-java-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krishnapollu%2Fazure-devops-testplan-java-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/krishnapollu","download_url":"https://codeload.github.com/krishnapollu/azure-devops-testplan-java-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krishnapollu%2Fazure-devops-testplan-java-sdk/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266963279,"owners_count":24013020,"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","status":"online","status_checked_at":"2025-07-25T02:00:09.625Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["azure-devops","azure-testplan","sdk","test-automation"],"created_at":"2024-11-05T19:21:07.550Z","updated_at":"2025-07-25T06:03:47.865Z","avatar_url":"https://github.com/krishnapollu.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# azure-testplan-sdk\n\nJava based SDK to integrate your automation test results to Azure DevOps Test Plan. Add this library to your pom.xml and use the methods to POST your test results to Azure DevOps. This SDK internally uses the Azure DevOps REST APIs to update the results to your project.\n\n### Maven Dependency\n```maven\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.testautomation\u003c/groupId\u003e\n  \u003cartifactId\u003eazure-devops-testplan-java-sdk\u003c/artifactId\u003e\n  \u003cversion\u003e1.0-SNAPSHOT\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### Usage\nThe below snippets are to be added in your hooks or listeners so that this gets executed after each test case execution.\n\nSet basic details of your Azure DevOps server / project. To be set during the beginning of the execution.\n```java\n //init config class\n        AzureConfig.organization = \"\";\n        AzureConfig.project = \"\";\n        AzureConfig.accessToken = \"\";\n        AzureConfig.setBaseURL();\n```\n\nThe Azure DevOps Test Execution has the below hierarchy\n`` Test Plan --\u003e Test Suite --\u003e Test Run --\u003e Test Results --\u003e Test Points ``\n\nSetting the Test Suite Entity\n```java\nTestSuiteEntity testSuiteEntity = new TestSuiteEntity();\n        testSuiteEntity.setPlan_id(606035); // update with your Test Plan ID\n        testSuiteEntity.setParentSuiteId(606036); // update with your Test Suite ID\n        testSuiteEntity.setQueryString(\"Automation_TC\", AzureConfig.project);\n        testSuiteEntity = TestSuite.create(testSuiteEntity);\n```\n\nCreating a Test Run\n```java\n//create testrun\n        TestRunEntity testRunEntity = new TestRunEntity();\n        testRunEntity.setTestPlanId(606035); // update with your Test Plan ID\n        testRunEntity.setName(\"Test Suite\");\n        testRunEntity = TestRun.create(testRunEntity);\n```\n\nCreate a Test Result Entity against each Test Case you execute\n```java\n//test case - 745460\n        TestCaseEntity testCaseEntity1 = new TestCaseEntity();\n        testCaseEntity1.setId(745460); // update with test case ID\n        testCaseEntity1 = TestCase.get(testCaseEntity1, testSuiteEntity);\n        TestPointEntity testPointEntity1 = TestPoint.get(testCaseEntity1, testSuiteEntity);\n\n        TestResultEntity testResultEntity1 = new TestResultEntity();\n        testResultEntity1.setOutcome(\"Passed\"); // RUn status\n        testResultEntity1.setTestCaseId(testCaseEntity1.getId());\n        testResultEntity1.setTestPointId(testPointEntity1.getId());\n        testResultEntity1.setTestCaseTitle(testCaseEntity1.getName());\n        testResultEntity1.setDurationInMs(12000); // test case execution duration\n\n//test case - 745466\n        TestCaseEntity testCaseEntity2 = new TestCaseEntity();\n        testCaseEntity2.setId(745466);\n        testCaseEntity2 = TestCase.get(testCaseEntity2, testSuiteEntity);\n        TestPointEntity testPointEntity2 = TestPoint.get(testCaseEntity2, testSuiteEntity);\n\n        TestResultEntity testResultEntity2 = new TestResultEntity();\n        testResultEntity2.setOutcome(\"Failed\");\n        testResultEntity2.setErrorMessage(\"java.lang.NullPointerException\");\n        testResultEntity2.setStacktrace(ExceptionUtils.getStackTrace(new Exception()));\n        testResultEntity2.setTestCaseId(testCaseEntity2.getId());\n        testResultEntity2.setTestPointId(testPointEntity2.getId());\n        testResultEntity2.setTestCaseTitle(testCaseEntity2.getName());\n        testResultEntity2.setDurationInMs(1000);\n```\n\nNow add the Test Result Entities to Test Run\n```java\n        TestResult.add(testResultEntity1, testRunEntity);\n        TestResult.add(testResultEntity2, testRunEntity);\n```\n\nUpdate the Test Run\n```java\ntestRunEntity = TestRun.update(testRunEntity, \"Completed\",\n                \"Automated Test Run completed successfully.\");\n```\n\n#### Git Repo: [azure-devops-testplan-java-sdk](https://github.com/krishnapollu/azure-devops-testplan-java-sdk)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrishnapollu%2Fazure-devops-testplan-java-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrishnapollu%2Fazure-devops-testplan-java-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrishnapollu%2Fazure-devops-testplan-java-sdk/lists"}