{"id":20245404,"url":"https://github.com/sisense/sisense-playwright-test-examples","last_synced_at":"2026-04-29T19:34:36.927Z","repository":{"id":248826747,"uuid":"749835918","full_name":"sisense/sisense-playwright-test-examples","owner":"sisense","description":"Playwright test examples for Sisense application.","archived":false,"fork":false,"pushed_at":"2025-01-02T15:04:31.000Z","size":288,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-11T13:58:57.581Z","etag":null,"topics":["api-testing","automation","e2e","e2e-tests","page-object-model","playwright","playwright-typescript","sisense","testing","tests"],"latest_commit_sha":null,"homepage":"https://sisense.dev/","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/sisense.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}},"created_at":"2024-01-29T13:50:40.000Z","updated_at":"2025-01-02T15:04:35.000Z","dependencies_parsed_at":"2024-07-26T12:27:56.347Z","dependency_job_id":"072fe5a0-e0d0-4616-96de-365120841ab5","html_url":"https://github.com/sisense/sisense-playwright-test-examples","commit_stats":null,"previous_names":["sisense/sisense-playwright-test-examples"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sisense/sisense-playwright-test-examples","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sisense%2Fsisense-playwright-test-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sisense%2Fsisense-playwright-test-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sisense%2Fsisense-playwright-test-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sisense%2Fsisense-playwright-test-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sisense","download_url":"https://codeload.github.com/sisense/sisense-playwright-test-examples/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sisense%2Fsisense-playwright-test-examples/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32441338,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T18:12:22.909Z","status":"ssl_error","status_checked_at":"2026-04-29T18:11:33.322Z","response_time":110,"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":["api-testing","automation","e2e","e2e-tests","page-object-model","playwright","playwright-typescript","sisense","testing","tests"],"created_at":"2024-11-14T09:20:48.693Z","updated_at":"2026-04-29T19:34:36.910Z","avatar_url":"https://github.com/sisense.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Using Playwright for Testing Sisense\n\n### Introduction\n\nPlaywright is a modern automation library for testing web applications. It provides powerful tools to simulate user interactions and verify the functionality of web applications, including Sisense. k6 is a modern library for performance testing. This project is include both to provide you full testing cicle. This documentation will guide you through setting up a test project with Playwright and k6 for testing your Sisense dashboards and widgets.\n\n### Prerequisites\n\nBefore you begin, ensure you have the following installed:\n\n- Git\n- Node.js (version 18.16.0 or higher)\n- npm (Node Package Manager)\n- Docker\n- A Sisense environment to test against\n\n### Setting up a test project with Playwright\n\nClone the Playwright test project with tests.\n\n### Install/Update all project dependancies\n\n`npm install`\n\n### Install Playwright with browser engines (Chromium, Firefox, WebKit)\n\n`npx playwright-core install`\n\n### Specify Sisense user credentials and Sisense base url in the env.config.ts file\n\n![Sisense credentials](/screenshots/63bc92c3-684a-4443-bebf-926d8a7d7290.png)\n\n### Run with VS Code\n\n[Getting started with Playwright and VS Code](https://www.youtube.com/watch?v=Xz6lhEzgI5I)\n\n### Run the whole test project\n\n`npx playwright test --project=example --headed`\n\n### Run tests by file name\n\n`npx playwright test addUser.test.ts --project=example`\n\n### Run a test by its name\n\n`npx playwright test -g \"X-RAY-00001\" --project=all`\n\n### Run k6 tests\n\n`npm run k6 /dist/tests-k6/createUsers.test.js`\n\n### Tests examples description\n\nAPI test examples can be found in the tests/api folder, which contains:\n\n- Add user test (addUser.test.ts)\n- Add dashboard and share it test (dashboard.test.ts)\n- Restart pods test (pod.test.ts)\n\nUI test examples can be found in the tests/ui folder, which contains:\n\n- Build cube test (build.test.ts)\n- Create cube with database connector (connectors.test.ts)\n- Create dashboard test (dashboard.test.ts)\n- Navigate through application test (navigation.test.ts)\n- Create pulse alert (pulse.test.ts)\n\nPerformance test examples can be found in the tests-k6 folder, which contains:\n\n- Users and groups creation test and getting randomly group and user (createUsers.test.ts)\n\n### Create your own tests\n\nYou can choose any way to implement your test: **Layer1 \u003e Layer2 \u003e Layer3** or vice versa. Each test case consists of several actions (UI or API) = STEPS.\n\nUI: **Locator** (\\src\\pages) → **UIStep** (**UIStepClass** \\src\\steps\\ui) → **Test** (\\tests)\nAPI: **Controller** (\\src\\api\\controllers) → **ApiStep** (\\src\\steps\\api) → **Test** (\\tests)\nPerformance: **PerformanceStep** (\\tests-k6\\steps\\) → **Test** (\\tests-k6)\n\n![Tests structure](/screenshots/fcee388d-2f30-4f3a-9274-baa154cad6b3.png)\n\nFirst, search for existing UI/API/Performance steps. If the step already exists, you can just add it to your test case. If the step doesn’t exist yet, you can create it using the map above.\n\nTo implement a new step:\n\n- UI: PageObject locator + primitive action (e.g. `click()`, `fill()`, `innerText()`, etc.)\n- API: Controller (`get`, `post`, `patch`, etc.)\n- Performance: (`login`, `createUsers`, `createGroups`, etc.)\n\n**Each new UI Steps Class should be added to the Page fixtures (src\\fixtures\\pages.fixtures.ts) and fixtures you need should be added to your test.**\n\n### Best Practices\n\n- **Use Page Object Model:** Organize your tests using the Page Object Model pattern to improve maintainability and readability.\n- **Handle Dynamic Content:** Use appropriate waiting strategies to handle dynamic content that may take time to load.\n- **Use Environment Variables:** Store sensitive information like usernames and passwords in environment variables instead of hardcoding them in your tests.\n\n### Performance tests\n\n- **How it works:** The command to execute performance tests does the following things:\n\nTranspilates the Typescript files from ./tests-k6 to Javascript test files in the ./dist folder using Babel and Webpack. Runs the provided test with k6 using the Dockerfile and docker-compose, which will mount the ./dist folder to /dist, making the tests in there available for the container. Runs executed with option `--insecure-skip-tls-verify` insecure skip TLS verify. Please make sure docker is running on your system before execute performance tests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsisense%2Fsisense-playwright-test-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsisense%2Fsisense-playwright-test-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsisense%2Fsisense-playwright-test-examples/lists"}