{"id":41848002,"url":"https://github.com/testpointcorp/vansah-playwright-ts","last_synced_at":"2026-01-25T10:05:41.125Z","repository":{"id":321347681,"uuid":"917132312","full_name":"testpointcorp/vansah-playwright-ts","owner":"testpointcorp","description":"Seamlessly integrate Playwright automation with Vansah Test Management for Jira. This repository provides a robust Vansah TypeScript binding to log test results, manage test runs, and attach execution artifacts (e.g., screenshots) directly to your Test Case Runs in Vansah.","archived":false,"fork":false,"pushed_at":"2025-10-29T05:15:08.000Z","size":2377,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"prod","last_synced_at":"2025-10-29T07:20:17.535Z","etag":null,"topics":["reporting","test","test-automation","testing","typescript","vansah"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/testpointcorp.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-01-15T12:19:10.000Z","updated_at":"2025-10-29T05:15:09.000Z","dependencies_parsed_at":"2025-10-29T07:20:58.602Z","dependency_job_id":"439715a5-29d6-4242-a6df-595ee3bb69f5","html_url":"https://github.com/testpointcorp/vansah-playwright-ts","commit_stats":null,"previous_names":["testpointcorp/vansah-playwright-ts"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/testpointcorp/vansah-playwright-ts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testpointcorp%2Fvansah-playwright-ts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testpointcorp%2Fvansah-playwright-ts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testpointcorp%2Fvansah-playwright-ts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testpointcorp%2Fvansah-playwright-ts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/testpointcorp","download_url":"https://codeload.github.com/testpointcorp/vansah-playwright-ts/tar.gz/refs/heads/prod","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/testpointcorp%2Fvansah-playwright-ts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28751112,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T09:58:17.166Z","status":"ssl_error","status_checked_at":"2026-01-25T09:55:56.104Z","response_time":113,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["reporting","test","test-automation","testing","typescript","vansah"],"created_at":"2026-01-25T10:05:40.407Z","updated_at":"2026-01-25T10:05:41.120Z","avatar_url":"https://github.com/testpointcorp.png","language":"TypeScript","readme":"\u003cdiv align=\"center\"\u003e\n   \u003ca href=\"https://vansah.com\"\u003e\u003cimg src=\"https://vansah.com/app/logo/vansahjira-logo.svg\" /\u003e\u003c/a\u003e\u003cbr\u003e\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003eThis repository provides an integration between Playwright and \u003ca href=\"https://vansah.com\"\u003eVansah Test Management for Jira\u003c/a\u003e using TypeScript. It enables automated test logging, execution tracking, and Jira issue association directly from Playwright test scripts.\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://vansah.com/\"\u003e\u003cb\u003eWebsite\u003c/b\u003e\u003c/a\u003e •\n    \u003ca href=\"https://vansah.com/connect-integrations/\"\u003e\u003cb\u003eMore Connect Integrations\u003c/b\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Table of Contents\n\n- [Features](#features)\n- [Installation](#installation)\n- [Prerequisites](#prerequisites)\n- [Configuration](#configuration)\n- [Usage](#usage)\n  - [Running Tests](#running-tests)\n  - [VansahNode.ts Functions](#vansahnodets-functions)\n  - [vansahTestInit.ts Usage](#vansahtestinitts-usage)\n  - [Example Test Case](#example-test-case)\n  - [Explanation](#explanation)\n- [Project Structure](#project-structure)\n- [Dependencies](#dependencies)\n- [Contributing](#contributing)\n- [Developed By](#developed-by)\n\n\n## Features\n\n- Seamless integration with Vansah Test Management API.\n- Automated test run creation linked to Jira issues and test folders.\n- Real-time test logging with screenshots and step-by-step execution details.\n- Environment and release tracking for test runs.\n\n\n## Installation\n\nBefore starting, ensure you have [Node.js](https://nodejs.org/) installed.\n\n```sh\nnpm install\n```\n\n## Prerequisites\n- **Vansah API Token**: Obtain your [API token](https://help.vansah.com/en/articles/9824979-generate-a-vansah-api-token-from-jira) from your Jira workspace.\n- **Vansah URL**: The base URL for your Vansah instance (e.g., `https://prod.vansah.com`) or Obtain your [Vansah Connect URL](https://help.vansah.com/en/articles/10407923-vansah-api-connect-url) from Vansah API Tokens\n\n## Configuration\n\n1. Create a `.env` file in the project root and add your Vansah authentication token:\n   ```sh\n   VANSAH_TOKEN=your_vansah_api_token_here\n   ```\n2. Update `vansahTestInit.ts` with your Vansah API URL and relevant details.\n\n\n## Project Structure\n\n```\n.\n├── vansahTestInit.ts  # Initializes VansahNode with API details\n├── VansahNode.ts      # API client for interacting with Vansah\n├── example.spec.ts    # Sample Playwright test with Vansah integration\n├── package.json       # Project dependencies and metadata\n├── .env               # Environment variables (ignored in Git)\n└── README.md          # Project documentation\n```\n\n## Usage\n\n### Running Tests\n\nExecute the following command to run Playwright tests with Vansah integration:\n\n```sh\nnpx playwright test\n```\n\n### VansahNode.ts Functions\n\nThe `VansahNode.ts` file contains multiple functions to interact with Vansah API:\n\n- **setVansahUrl(url: string)** – Sets the Vansah API base URL.\n- **setVansahToken(token: string)** – Sets the authentication token for Vansah API.\n- **setSprintName(sprintName: string)** – Sets the sprint name associated with test cases.\n- **setEnvironmentName(environmentName: string)** – Sets the environment name for test runs.\n- **setReleaseName(releaseName: string)** – Sets the release name for test cases.\n- **setJiraIssueKey(jiraIssueKey: string)** – Associates a Jira issue with test runs.\n- **setTestFoldersId(testFoldersId: string)** – Sets the test folder identifier.\n- **addTestRunFromJiraIssue(testCase: string)** – Creates a test run linked to a Jira issue.\n- **addTestRunFromTestFolder(testCase: string)** – Creates a test run linked to a test folder.\n- **addQuickTestFromJiraIssue(testCase: string, result: string)** – Adds a quick test execution linked to a Jira issue.\n- **addQuickTestFromTestFolder(testCase: string, result: string)** – Adds a quick test execution linked to a test folder.\n- **addTestLog(result: string, comment: string, testStepRow: number, imagePath?: string)** – Logs a test result with optional image attachment.\n\n### vansahTestInit.ts Usage\n\nThe `vansahTestInit.ts` file initializes `VansahNode` with API credentials and relevant details. You must create this file and configure it as follows:\n\n```ts\nimport dotenv from \"dotenv\";\nimport VansahNode from \"./VansahNode\";\n\ndotenv.config();\n\nconst vansahnode = new VansahNode();\nconst token: string | undefined = process.env[\"VANSAH_TOKEN\"];\n\nif (!token) {\n  throw new Error(\"VANSAH_TOKEN is not set. Please configure it in your environment or .env file.\");\n}\n\n// Set the Vansah API base URL\nvansahnode.setVansahUrl(\"https://prod.vansah.com\"); //The base URL for your Vansah instance (e.g., `https://prod.vansah.com`) or Obtain your [Vansah Connect URL](https://help.vansah.com/en/articles/10407923-vansah-api-connect-url) from Vansah API Tokens\n\n// Assign the API token for authentication\nvansahnode.setVansahToken(token);\n\n// Define the sprint name in Vansah where test cases will be linked\nvansahnode.setSprintName(\"TF Sprint 1\");\n\n// Specify the testing environment (e.g., UAT, Production, Staging)\nvansahnode.setEnvironmentName(\"UAT\");\n\n// Define the release name for organizing test cases\nvansahnode.setReleaseName(\"TestingTRUNK\");\n\n// Link the configuration to a Jira issue key for tracking test execution\nvansahnode.setJiraIssueKey(\"TF-4\");\n\nexport default vansahnode;\n```\n\nThis ensures that `VansahNode` is configured correctly and can be imported into test files.\n\n### Example Test Case\n\nThe `example.spec.ts` file demonstrates how to log test executions into Vansah:\n\n```ts\nimport { test, expect } from \"@playwright/test\";\nimport vansahnode from \"../vansah-binding/vansahTestInit\";\n\nlet TEST_CASE = \"TF-C72\"; // Replace with your test case key\n\ntest.describe(\"Example Playwright Test with Vansah Integration\", () =\u003e {\n  \n  test.beforeAll(async () =\u003e {\n    \n    await vansahnode.addTestRunFromJiraIssue(TEST_CASE); // Create a test run before executing tests\n\n  });\n\n  test(\"Verify homepage title\", async ({ page }) =\u003e {\n    try {\n      try {\n      // Navigate to the Playwright homepage\n      await page.goto(\"https://playwright.dev/\");\n\n      // Verify the page title contains 'Playwright'\n      await expect(page).toHaveTitle(/Playwright/);\n      \n      await vansahnode.addTestLog(\"PASSED\", \"Homepage title is correct\", 1, \"sample/images/passed.png\");   // Log success in Vansah\n\n    } catch (error) {\n      await vansahnode.addTestLog(\"FAILED\", `Homepage title verification failed: ${error.message}`, 1, \"sample/images/failed.png\");  // Log failure in Vansah\n      throw error;\n    }\n  });\n\n  test(\"Check link navigation\", async ({ page }) =\u003e {\n    try {\n      // Navigate to the Playwright homepage\n      await page.goto(\"https://playwright.dev/\");\n\n      // Click the 'Get started' link\n      await page.getByRole(\"link\", { name: \"Get started\" }).click();\n\n      // Verify the 'Installation' heading is visible\n      await expect(\n        page.getByRole(\"heading\", { name: \"Installation\" })\n      ).toBeVisible();\n\n      // Log success in Vansah\n      await vansahnode.addTestLog(\n        \"PASSED\",\n        \"Link navigation is correct\",\n        2,\n        \"sample/images/passed.png\"\n      );\n    } catch (error) {\n      // Log failure in Vansah\n      await vansahnode.addTestLog(\n        \"FAILED\",\n        `Link navigation failed: ${error.message}`,\n        2,\n        \"sample/images/failed.png\"\n      );\n      throw error;\n    }\n  });\n});\n```\n\n### Explanation\n\n- **Before running tests**, a test run is created and linked to a Jira issue.\n- **Each test** logs the execution result (PASSED/FAILED) in Vansah.\n- **Screenshots** are attached as evidence in case of failure.\n- **Assertions** ensure that expected elements are visible and correct.\n\n\n## Dependencies\n\n- [Playwright](https://playwright.dev/) (`@playwright/test`)\n- [Axios](https://axios-http.com/)\n- [dotenv](https://www.npmjs.com/package/dotenv)\n\n## Contributing\n\nFeel free to open issues or submit pull requests to enhance this integration.\n\n## Developed By\n\n[Vansah](https://vansah.com/)\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftestpointcorp%2Fvansah-playwright-ts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftestpointcorp%2Fvansah-playwright-ts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftestpointcorp%2Fvansah-playwright-ts/lists"}