{"id":17028455,"url":"https://github.com/svierk/salesforce-utam-e2e-testing","last_synced_at":"2025-06-11T21:08:29.303Z","repository":{"id":167865707,"uuid":"643218141","full_name":"svierk/salesforce-utam-e2e-testing","owner":"svierk","description":"🧪 SFDX template for using UTAM to establish Salesforce E2E UI test automation in your project","archived":false,"fork":false,"pushed_at":"2025-05-06T15:42:35.000Z","size":1173,"stargazers_count":15,"open_issues_count":3,"forks_count":5,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-06T16:52:08.994Z","etag":null,"topics":["e2e-tests","salesforce","salesforce-developers","sfdx","test-automation","ui-testing","utam","utam-js-wdio"],"latest_commit_sha":null,"homepage":"https://utam.dev/","language":"JavaScript","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/svierk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["svierk"]}},"created_at":"2023-05-20T13:19:32.000Z","updated_at":"2025-05-06T15:39:46.000Z","dependencies_parsed_at":"2024-01-01T18:29:44.872Z","dependency_job_id":"40d0ed30-9bc5-4c88-bb1d-81119ea7717b","html_url":"https://github.com/svierk/salesforce-utam-e2e-testing","commit_stats":null,"previous_names":["svierk/salesforce-utam-e2e-testing"],"tags_count":0,"template":true,"template_full_name":"svierk/sfdx-project-starter-kit","purl":"pkg:github/svierk/salesforce-utam-e2e-testing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svierk%2Fsalesforce-utam-e2e-testing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svierk%2Fsalesforce-utam-e2e-testing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svierk%2Fsalesforce-utam-e2e-testing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svierk%2Fsalesforce-utam-e2e-testing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/svierk","download_url":"https://codeload.github.com/svierk/salesforce-utam-e2e-testing/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svierk%2Fsalesforce-utam-e2e-testing/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259340748,"owners_count":22843041,"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":["e2e-tests","salesforce","salesforce-developers","sfdx","test-automation","ui-testing","utam","utam-js-wdio"],"created_at":"2024-10-14T07:54:33.102Z","updated_at":"2025-06-11T21:08:29.264Z","avatar_url":"https://github.com/svierk.png","language":"JavaScript","funding_links":["https://github.com/sponsors/svierk"],"categories":[],"sub_categories":[],"readme":"# 🧪 Salesforce UTAM E2E Testing\n\n![GitHub CI](https://github.com/svierk/salesforce-utam-e2e-testing/actions/workflows/ci.yml/badge.svg)\n\n## About the project\n\nThis repository provides a template for setting up E2E UI test automation with [UTAM](https://utam.dev/) (UI Test Automation Model) in Salesforce DX projects.\nIn addition to the basic test setup configuration, a number of sample test cases are included to help you get started with UTAM. The configuration shown here was set up based on the contents of the following two repositories:\n\n- [UTAM JavaScript Recipes](https://github.com/salesforce/utam-js-recipes) | Various examples of how to test the Salesforce UI with UTAM\n- [Salesforce E-Bikes App](https://github.com/trailheadapps/ebikes-lwc) | LWC sample application with UTAM UI tests\n\n## Prerequisites\n\nTo use this template, the [Node](https://nodejs.org/en/) version specified in the _package.json_ and the latest version of the [Salesforce CLI](https://developer.salesforce.com/tools/sfdxcli) should already be installed.\n\n## Getting started\n\nFollow the steps below to get the template running and manually execute the sample tests already included. The sample tests should be generic enough to run in any Salesforce Org without specific configuration, such as a Trailhead Playground.\n\n1. First clone the repository and open it with VS Code, install all the recommended extensions and run the following command to install all required dependencies:\n\n   ```\n   npm install\n   ```\n\n2. Next you need to authorize an org for which you want to run the tests. In VS Code this can be done by pressing **Command + Shift + P**, enter \"sfdx\", and select **SFDX: Authorize an Org**. Alternatively you can also run the following command from the command line:\n\n   ```\n   sf org login web\n   ```\n\n3. Compile all UTAM page objects:\n\n   ```\n   npm run test:ui:compile\n   ```\n\n4. Prepare the Salesforce login information:\n\n   ```\n   npm run test:ui:generate:login\n   ```\n\n5. Finally, execute all existing UI tests:\n\n   ```\n   npm run test:ui\n   ```\n\n**Note:** By default, the tests are executed in headless mode with the given configuration, i.e. the browser does not open visibly but runs tests in the background. This configuration is primarily intended for automatic execution in CI/CD pipelines. To deactivate the headless mode for local development and testing purposes, please comment out the following line in _wdio.conf.js_:\n\n```\nargs: ['--headless']\n```\n\n## How to write your own tests\n\nCreating UTAM tests is not trivial and the setup may involve one or two hurdles. Fortunately, there is a handy [UTAM Chrome Browser Extension](https://utam.dev/tools/browser-extension) to help with writing the tests. This extension helps to identify the page objects of interest directly in the Salesforce org and generates the corresponding test code in the selected language:\n\n\u003cimg src=\"https://cdn-images-1.medium.com/v2/resize:fit:1600/1*gQH6S45TfI0evZ_JsnpHHA.png\" alt=\"custom-slider\" width=\"500\"/\u003e\n\n## Automated test execution with GitHub Actions\n\nUTAM tests can also be executed automatically in headless mode within a pipeline. The following Medium article describes how to an automated UTAM test execution in detail:\n\n[Automate Salesforce E2E Testing using UTAM \u0026 GitHub Actions](https://medium.com/capgemini-salesforce-architects/automate-salesforce-e2e-testing-using-utam-github-actions-b11906fefc85)\n\nBelow is an example with GitHub Actions, which is also used in this repository and can be found in the _.github_ directory:\n\n```\ntests:\n  name: E2E UI Tests\n  runs-on: ubuntu-latest\n  steps:\n    - name: Checkout\n      uses: actions/checkout@main\n      with:\n        fetch-depth: 0\n    - name: Select Node Version\n      uses: svierk/get-node-version@main\n    - name: Install Dependencies\n      run: npm ci\n    - name: Install SF CLI\n      uses: svierk/sfdx-cli-setup@main\n    - name: Salesforce Org Login\n      uses: svierk/sfdx-login@main\n      with:\n        client-id: ${{ secrets.SFDX_CONSUMER_KEY }}\n        jwt-secret-key: ${{ secrets.SFDX_JWT_SECRET_KEY }}\n        username: ${{ secrets.SFDX_USERNAME }}\n    - name: Compile UTAM Page Objects\n      run: npm run test:ui:compile\n    - name: Prepare Login Details\n      run: npm run test:ui:generate:login\n    - name: UTAM E2E Tests\n      run: npm run test:ui\n```\n\n## Learn more about UTAM\n\n- [UTAM Website](https://utam.dev/) | Official UTAM Documentation\n- [Run End-to-End Tests with the UI Test Automation Model (UTAM)](https://developer.salesforce.com/blogs/2022/05/run-end-to-end-tests-with-the-ui-test-automation-model-utam) | Post in Salesforce Developers' Blog\n- [Run End-to-End Tests With UTAM](https://www.youtube.com/watch?v=rxZfsjIwWeU) | YouTube video that provides a 15min UTAM overview\n- [Getting Started with UTAM](https://www.youtube.com/watch?v=YMxeCJexgMY) | YouTube video about a 1h step by step guide for writing a UTAM test\n- [Streamline E2E Testing with UTAM: Salesforce’s UI Test Automation Model](https://medium.com/capgemini-salesforce-architects/streamline-e2e-testing-with-utam-salesforces-ui-test-automation-model-51c0effb1e67) | Medium Post\n- [Automate Salesforce E2E Testing using UTAM \u0026 GitHub Actions](https://medium.com/capgemini-salesforce-architects/automate-salesforce-e2e-testing-using-utam-github-actions-b11906fefc85) | Medium Post\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsvierk%2Fsalesforce-utam-e2e-testing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsvierk%2Fsalesforce-utam-e2e-testing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsvierk%2Fsalesforce-utam-e2e-testing/lists"}