diff --git a/README.md b/README.md index e15d1f4..65e151d 100644 --- a/README.md +++ b/README.md @@ -1,346 +1,118 @@ -hyperexecute_logo +# Run Protractor Tests on HyperExecute with TestMu AI (Formerly LambdaTest) -HyperExecute is a smart test orchestration platform to run end-to-end Selenium tests at the fastest speed possible. HyperExecute lets you achieve an accelerated time to market by providing a test infrastructure that offers optimal speed, test orchestration, and detailed execution logs. +

+ Made by TestMu AI + Protractor version + Community +

-The overall experience helps teams test code and fix issues at a much faster pace. HyperExecute is configured using a YAML file. Instead of moving the Hub close to you, HyperExecute brings the test scripts close to the Hub! +## Getting Started -* HyperExecute HomePage: https://www.lambdatest.com/hyperexecute -* Lambdatest HomePage: https://www.lambdatest.com -* LambdaTest Support: [support@lambdatest.com](mailto:support@lambdatest.com) +[TestMu AI](https://www.testmuai.com/) (Formerly LambdaTest) is the world's first full-stack AI Agentic Quality Engineering platform that empowers teams to test intelligently, smarter, and ship faster. Built for scale, it offers a full-stack testing cloud with 10K+ real devices and 3,000+ browsers. With AI-native test management, MCP servers, and agent-based automation, TestMu AI supports Selenium, Appium, Playwright, and all major frameworks. -To know more about how HyperExecute does intelligent Test Orchestration, do check out [HyperExecute Getting Started Guide](https://www.lambdatest.com/support/docs/getting-started-with-hyperexecute/) +With TestMu AI (Formerly LambdaTest), you can run Protractor tests on HyperExecute — the smart test orchestration platform for fastest execution. This sample shows how to configure Protractor tests to run on HyperExecute. -[Try it now](https://hyperexecute.lambdatest.com/?utm_source=github&utm_medium=repository&utm_content=javascript&utm_term=protractor) +- [Sign up on TestMu AI](https://www.testmuai.com/register/) (Formerly LambdaTest). +- Follow the [TestMu AI Documentation](https://www.testmuai.com/support/docs/) for the full setup walkthrough. -## Gitpod +### Prerequisites -Follow the below steps to run Gitpod button: +- Node.js and npm (latest stable) +- HyperExecute CLI binary (download from https://www.testmuai.com/support/docs/getting-started-with-hyperexecute/) +- A TestMu AI (Formerly LambdaTest) account with your username and access key -1. Click '**Open in Gitpod**' button (You will be redirected to Login/Signup page). -2. Login with Lambdatest credentials and it will be redirected to Gitpod editor in new tab and current tab will show hyperexecute dashboard. +### Setup -[Run in Gitpod](https://hyperexecute.lambdatest.com/hyperexecute/jobs?type=gitpod&framework=Protractor) ---- - - -# How to run Selenium automation tests on HyperExecute (using protractor framework) - -* [Pre-requisites](#pre-requisites) - - [Download HyperExecute CLI](#download-hyperexecute-cli) - - [Configure Environment Variables](#configure-environment-variables) - -* [Auto-Split Execution with protractor](#auto-split-execution-with-protractor) - - [Core](#core) - - [Pre Steps and Dependency Caching](#pre-steps-and-dependency-caching) - - [Artifacts Management](#artifacts-management) - - [Test Execution](#test-execution) - -* [Matrix Execution with protractor](#matrix-execution-with-protractor) - - [Core](#core-1) - - [Pre Steps and Dependency Caching](#pre-steps-and-dependency-caching-1) - - [Artifacts Management](#artifacts-management-1) - - [Test Execution](#test-execution-1) - -* [Run Protractor tests on Windows and Linux platforms](#run-protractor-tests-on-windows-and-linux-platforms) -* [Secrets Management](#secrets-management) -* [Navigation in Automation Dashboard](#navigation-in-automation-dashboard) - -# Pre-requisites - -Before using HyperExecute, you have to download HyperExecute CLI corresponding to the host OS. Along with it, you also need to export the environment variables *LT_USERNAME* and *LT_ACCESS_KEY* that are available in the [LambdaTest Profile](https://accounts.lambdatest.com/detail/profile) page. - -## Download HyperExecute CLI - -HyperExecute CLI is the CLI for interacting and running the tests on the HyperExecute Grid. The CLI provides a host of other useful features that accelerate test execution. In order to trigger tests using the CLI, you need to download the HyperExecute CLI binary corresponding to the platform (or OS) from where the tests are triggered: - -Also, it is recommended to download the binary in the project's parent directory. Shown below is the location from where you can download the HyperExecute CLI binary: - -* Mac: https://downloads.lambdatest.com/hyperexecute/darwin/hyperexecute -* Linux: https://downloads.lambdatest.com/hyperexecute/linux/hyperexecute -* Windows: https://downloads.lambdatest.com/hyperexecute/windows/hyperexecute.exe - -## Configure Environment Variables - -Before the tests are run, please set the environment variables LT_USERNAME & LT_ACCESS_KEY from the terminal. The account details are available on your [LambdaTest Profile](https://accounts.lambdatest.com/detail/profile) page. - -For macOS: +Clone and install dependencies: ```bash -export LT_USERNAME=LT_USERNAME -export LT_ACCESS_KEY=LT_ACCESS_KEY +git clone https://github.com/LambdaTest/Protractor-HyperExecute-Sample && cd Protractor-HyperExecute-Sample +npm install ``` -For Linux: +Set your credentials as environment variables. -```bash -export LT_USERNAME=LT_USERNAME -export LT_ACCESS_KEY=LT_ACCESS_KEY -``` - -For Windows: +**macOS / Linux:** ```bash -set LT_USERNAME=LT_USERNAME -set LT_ACCESS_KEY=LT_ACCESS_KEY -``` - -## Auto-Split Execution with Protractor - -Auto-split execution mechanism lets you run tests at predefined concurrency and distribute the tests over the available infrastructure. Concurrency can be achieved at different levels - file, module, test suite, test, scenario, etc. - -For more information about auto-split execution, check out the [Auto-Split Getting Started Guide](https://www.lambdatest.com/support/docs/getting-started-with-hyperexecute/#smart-auto-test-splitting) - -### Core - -Auto-split YAML file (*HyperExecute-Yaml\.hyperexecuteStatic.yaml*) in the repo contains the following configuration: - -```yaml -globalTimeout: 90 -testSuiteTimeout: 90 -testSuiteStep: 90 -``` - -Global timeout, testSuite timeout, and testSuite timeout are set to 90 minutes. -  -The *runson* key determines the platform (or operating system) on which the tests are executed. Here we have set the target OS as Windows. - -```yaml -runson: win -``` - -Auto-split is set to true in the YAML file. - -```yaml - autosplit: true -``` - -*retryOnFailure* is set to true, instructing HyperExecute to retry failed command(s). The retry operation is carried out till the number of retries mentioned in *maxRetries* are exhausted or the command execution results in a *Pass*. In addition, the concurrency (i.e. number of parallel sessions) is set to 2. - -```yaml -retryOnFailure: true -runson: win -maxRetries: 2 -``` - -## Pre Steps and Dependency Caching - -To leverage the advantage offered by *Dependency Caching* in HyperExecute, the integrity of *package-lock.json* is checked using the checksum functionality. - -```yaml -cacheKey: '{{ checksum "package-lock.json" }}' -``` - -The caching advantage offered by *NPM* can be leveraged in HyperExecute, whereby the downloaded packages can be stored (or cached) in a secure server for future executions. The packages available in the cache will only be used if the checksum stage results in a Pass. - - - -```yaml -cacheDirectories: - - node_modules -``` - -The *testDiscovery* directive contains the command that gives details of the mode of execution, along with detailing the command that is used for test execution. Here, we are fetching the list of Feature file scenario that would be further executed using the *value* passed in the *testRunnerCommand* - -```yaml -testDiscovery: - type: raw - mode: static - command: grep -nri 'describe' specs -ir --include=\*.js | sed 's/:.*//' - -testRunnerCommand: protractor conf/single.conf.js --specs=$test --browser=chrome -``` - -Running the above command on the terminal will give a list of Feature Scenario lines that are located in the Project folder: - -Test Discovery Output: -specs/fileupload.js -specs/single.js - -The *testRunnerCommand* contains the command that is used for triggering the test. The output fetched from the *testDiscoverer* command acts as an input to the *testRunner* command. - -```yaml -testRunnerCommand: protractor conf/single.conf.js --specs=$test --browser=chrome +export LT_USERNAME="YOUR_USERNAME" +export LT_ACCESS_KEY="YOUR_ACCESS_KEY" ``` -![image](https://user-images.githubusercontent.com/47247309/160448577-cecd6f22-d5a7-49f3-9166-8f239fe133fc.png) - -### Artifacts Management - -The *mergeArtifacts* directive (which is by default *false*) is set to *true* for merging the artifacts and combing artifacts generated under each task. - -The *uploadArtefacts* directive informs HyperExecute to upload artifacts [files, reports, etc.] generated after task completion. In the example, *path* consists of a regex for parsing the directory (i.e. *reports* that contains the test reports). - -```yaml -mergeArtifacts: true - -uploadArtefacts: - - name: Reports - path: - - ProtractorTestReport.html - - xmlresults.xml - -``` -HyperExecute also facilitates the provision to download the artifacts on your local machine. To download the artifacts, click on *Artifacts* button corresponding to the associated TestID. - -### Test Execution - -The CLI option *--config* is used for providing the custom HyperExecute YAML file (i.e. *.hyperExecute_autoSplit.yaml*). Run the following command on the terminal to trigger the tests in Python files on the HyperExecute grid. The *--download-artifacts* option is used to inform HyperExecute to download the artifacts for the job. +**Windows:** ```bash -./hyperexecute --config --verbose -i .hyperexecute_autoSplit.yaml -``` - -Visit [HyperExecute Automation Dashboard](https://automation.lambdatest.com/hyperexecute) to check the status of execution - -# Matrix Execution with Protractor - -Matrix-based test execution is used for running the same tests across different test (or input) combinations. The Matrix directive in HyperExecute YAML file is a *key:value* pair where value is an array of strings. - -Also, the *key:value* pairs are opaque strings for HyperExecute. For more information about matrix multiplexing, check out the [Matrix Getting Started Guide](https://www.lambdatest.com/support/docs/getting-started-with-hyperexecute/#matrix-based-build-multiplexing) - -### Core - -In the current example, matrix YAML file (*hyperExecute_matrix.yaml*) in the repo contains the following configuration: - -```yaml -globalTimeout: 90 -testSuiteTimeout: 90 -testSuiteStep: 90 -``` - -Global timeout, testSuite timeout, and testSuite timeout are set to 90 minutes. -  -The target platform is set to Windows. Please set the *[runson]* key to *[mac]* if the tests have to be executed on the macOS platform. - -```yaml -runson: win -``` - -Protractor Spec files in the contain the Test Scenario run on the HyperExecute grid. In the example, the Test file *specs/fileupload.js* run in parallel on the basis of scenario by using the specified input combinations. - -```yaml -matrix: - os: [linux] - browser: ["chrome","firefox","edge"] - Specs: ["specs/fileupload.js","specs/single.js"] - -``` - -The *testSuites* object contains a list of commands (that can be presented in an array). In the current YAML file, commands for executing the tests are put in an array (with a '-' preceding each item). The npx command is used to run tests in *spec* files. The tags are mentioned as an array to the *tags* key that is a part of the matrix. - -```yaml -testSuites: - - protractor conf/single.conf.js --specs=$Specs --browser=$browser +set LT_USERNAME="YOUR_USERNAME" +set LT_ACCESS_KEY="YOUR_ACCESS_KEY" ``` -![image](https://user-images.githubusercontent.com/47247309/160449629-19886b8b-c07e-448f-9bc8-09a350d5b53e.png) +### Run tests -### Pre Steps and Dependency Caching - -Dependency caching is enabled in the YAML file to ensure that the package dependencies are not downloaded in subsequent runs. The first step is to set the Key used to cache directories. - -```yaml -cacheKey: '{{ checksum "package-lock.json" }}' -``` - -Set the array of files & directories to be cached. In the example, all the packages will be cached in the *CacheDir* directory. - -```yaml -cacheDirectories: - - node_modules +```bash +./hyperexecute --config --verbose yaml/.hyperexecute_simple_win.yaml ``` -Steps (or commands) that must run before the test execution are listed in the *pre* run step. In the example, the packages listed in *requirements.txt* are installed using the *npm install* command. +For Linux: -```yaml -pre: - - npm install -g protractor - - npm install +```bash +./hyperexecute --config --verbose yaml/.hyperexecute_simple_linux.yaml ``` -### Artifacts Management - -The *mergeArtifacts* directive (which is by default *false*) is set to *true* for merging the artifacts and combing artifacts generated under each task. - -The *uploadArtefacts* directive informs HyperExecute to upload artifacts [files, reports, etc.] generated after task completion. In the example, *path* consists of a regex for parsing the directory (i.e. *reports* that contains the test reports). - -```yaml -mergeArtifacts: true - -uploadArtefacts: - - name: Reports - path: - - ProtractorTestReport.html - - xmlresults.xml -``` -![image](https://user-images.githubusercontent.com/47247309/160449743-ab99951d-dba9-49da-9347-85c19ec4ede9.png) +View results on your TestMu AI dashboard. +### Local testing with TestMu AI Tunnel -HyperExecute also facilitates the provision to download the artifacts on your local machine. To download the artifacts, click on Artifacts button corresponding to the associated TestID. +To test locally hosted apps, set up the TestMu AI tunnel. OS-specific guides: -## Test Execution +- [Local Testing on Windows](https://www.testmuai.com/support/docs/local-testing-for-windows/) +- [Local Testing on macOS](https://www.testmuai.com/support/docs/local-testing-for-macos/) +- [Local Testing on Linux](https://www.testmuai.com/support/docs/local-testing-for-linux/) -The CLI option *--config* is used for providing the custom HyperExecute YAML file (i.e. *hyperExecute_Matrix.yaml*). Run the following command on the terminal to trigger the tests in Feature file Scenario on the HyperExecute grid. +Add the following to your capabilities: -```bash -./hyperexecute --config --verbose -i .hyperExecute_matrix.yaml +```js +tunnel: true, ``` -![image](https://user-images.githubusercontent.com/47247309/160449910-99361d98-f2e9-47d7-b3a0-a4fbc81e9557.png) +## Contributions -Visit [HyperExecute Automation Dashboard](https://automation.lambdatest.com/hyperexecute) to check the status of execution: +Contributions are welcome. Open an issue to discuss your idea before submitting a pull request. When reporting bugs, include your Node.js version, OS, and Protractor version. -## Run Protractor tests on Windows and Linux platforms +## TestMu AI (Formerly LambdaTest) Community -The CLI option *--config* is used for providing the custom HyperExecute YAML file (i.e. *yaml/.hyperexecute_simple_win.yaml* for Windows and *yaml/.hyperexecute_simple_linux.yaml* for Linux). +Connect with testers and developers in the [TestMu AI Community](https://community.testmuai.com/). Ask questions, share what you are building, and discuss best practices in test automation and DevOps. + +## TestMu AI (Formerly LambdaTest) Certifications -Run the following command on the terminal to trigger tests on Windows platform: +Earn free [TestMu AI Certifications](https://www.testmuai.com/certifications/) for testers, developers, and QA engineers. Validate your skills in Selenium, Cypress, Playwright, Appium, Espresso and more. Industry-recognized, shareable on LinkedIn, and built by practitioners, not marketers. -```bash -./hyperexecute --config --verbose yaml/.hyperexecute_simple_win.yaml -``` +## Learning Resources by TestMu AI (Formerly LambdaTest) -Run the following command on the terminal to trigger tests on Linux platform: +Learn modern testing through tutorials, guides, videos, and weekly updates: -```bash -./hyperexecute --config --verbose yaml/.hyperexecute_simple_linux.yaml -``` - -## Secrets Management +* [TestMu AI Blog](https://www.testmuai.com/blog/) +* [TestMu AI Learning Hub](https://www.testmuai.com/learning-hub/) +* [TestMu AI on YouTube](https://www.youtube.com/@TestMuAI) +* [TestMu AI Newsletter](https://www.testmuai.com/newsletter/) + +## LambdaTest is Now TestMu AI -In case you want to use any secret keys in the YAML file, the same can be set by clicking on the *Secrets* button the dashboard. +On **January 12, 2026**, [LambdaTest evolved to TestMu AI](https://www.testmuai.com/lambdatest-is-now-testmuai/), the world's first fully autonomous **Agentic AI Quality Engineering Platform**. +Same team. Same infrastructure. Same customer accounts. All existing LambdaTest logins, scripts, capabilities, and integrations continue to work without change. -All you need to do is create an environment variable that uses the secret key: - -```yaml -env: - LT_ACCESS_KEY: ${{.secrets.LT_ACCESS_KEY}} -``` - -## Navigation in Automation Dashboard +👉 Find the new home for [LambdaTest](https://www.testmuai.com). -HyperExecute lets you navigate from/to *Test Logs* in Automation Dashboard from/to *HyperExecute Logs*. You also get relevant get relevant Selenium test details like video, network log, commands, Exceptions & more in the Dashboard. Effortlessly navigate from the automation dashboard to HyperExecute logs (and vice-versa) to get more details of the test execution. +### How LambdaTest Evolved into TestMu AI -## LambdaTest Community :busts_in_silhouette: +In 2017, we launched LambdaTest with a simple mission: make testing fast, reliable, and accessible. As LambdaTest grew, we expanded into Test Intelligence, Visual Regression Testing, Accessibility Testing, API Testing, and Performance Testing, covering the full depth of the testing lifecycle. -The [LambdaTest Community](https://community.lambdatest.com/) allows people to interact with tech enthusiasts. Connect, ask questions, and learn from tech-savvy people. Discuss best practises in web development, testing, and DevOps with professionals from across the globe. +As software development entered the AI era, testing had to evolve, too. We rebuilt the architecture to be AI-native from the ground up, with autonomous agents that **plan, author, execute, analyze, and optimize tests** while keeping humans in the loop. The platform integrates with your repos, CI, IDEs, and terminals, continuously learning from every code change and development signal. -## Documentation & Resources :books: - -If you want to learn more about the LambdaTest's features, setup, and usage, visit the [LambdaTest documentation](https://www.lambdatest.com/support/docs/). You can also find in-depth tutorials around test automation, mobile app testing, responsive testing, manual testing on [LambdaTest Blog](https://www.lambdatest.com/blog/) and [LambdaTest Learning Hub](https://www.lambdatest.com/learning-hub/). - - ## About LambdaTest +That evolution earned a new name: **TestMu AI**, built for an AI-first future of quality engineering. TestMu is not a new name for us. It is the name of our annual community conference, which has brought together 100,000+ quality engineers to discuss how AI would reshape testing, long before that became an industry norm. -[LambdaTest](https://www.lambdatest.com) is a leading test execution and orchestration platform that is fast, reliable, scalable, and secure. It allows users to run both manual and automated testing of web and mobile apps across 3000+ different browsers, operating systems, and real device combinations. Using LambdaTest, businesses can ensure quicker developer feedback and hence achieve faster go to market. Over 500 enterprises and 1 Million + users across 130+ countries rely on LambdaTest for their testing needs. +What started as a high-performance cloud testing platform has transformed into an AI-native, multi-agent system powering a connected, end-to-end quality layer. That evolution defined a new identity: LambdaTest evolved into TestMu AI, built for an AI-first future of quality engineering. -[](https://accounts.lambdatest.com/register) - -## We are here to help you :headphones: +## Support -* Got a query? we are available 24x7 to help. [Contact Us](mailto:support@lambdatest.com) -* For more info, visit - https://www.lambdatest.com +Got a question? Email [support@testmuai.com](mailto:support@testmuai.com) or chat with us 24x7 from our chat portal.