Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@repeato/cli-testrunner
Advanced tools
Readme
Repeato CLI is a headless test runner that allows you to execute test batches designed with Repeato Studio.
We try to rely as much a possible on open standards, so all the workspace data is stored in either image formats or text based formats (mostly JSON). That makes it possible to generate tests not just with Repeato Studio, but also with tools of your choice. That's also true for the test run artefacts: All data is stored as image data (screenshots), XML (JUnit export, can be used for Jenkins) and JSON.
Repeato CLI is built using Node.js which makes it possible to run it on almost any system. However, it has dependencies to native modules, which makes it necessary to build parts of it for the target OS and platform.
Node.js version 16 is strongly recommended.
You can use nvm to switch to the right Node.js version:
nvm use 16
.
You can also choose to use another Node.js version, but this requires compiling our native modules on your end. We don't recommend doing this, because it can require some effort to get it working.
The recommended way of using this package is via npx, which downloads and runs Repeato-CLI right away:
npx @repeato/cli-testrunner
If you run Repeato as part of your CI/CD, you might want to fix the version of the test runner, so you don't run into a situation where your setup breaks because of updates we ship. (Although those should usually not cause any problems!)
npx @repeato/cli-testrunner@1.4.95
npm -g @repeato/cli-testrunner
...and then run it like this:
cli-testrunner --help
The testrunner essentially needs two inputs:
cli-testrunner --help
will print all the required and optional params:
Runs a selected test batch of your Repeato workspace
Usage via npx:
$ npx @repeato/cli-testrunner [params]
Usage when installed globally via npm:
$ cli-testrunner [params]
Required params:
--workspaceDir: Path to the workspace directory. See also https://www.repeato.app/documentation/test-workspaces/
--batchId: Which batch should be executed.
Just execute cli-testrunner --workspaceDir [workspace-dir] to see a list of contained batches
Optional params:
--deviceId: The device ID of the device you want to connect to
List Android devices via 'adb devices' or iOS simulators via 'xcrun simctl list'
--runMode: "AllTests" | "OnlyFailed" (default: "AllTests")
--timeoutFactor: Since some CI servers sometimes don't provide as much performance as local machines,
it can be useful to increase the timeout when running on a server by a factor. E.g pass 1.5 to increase the timeouts by 50% (default: 1.0)
--waitDurationBetweenSteps: Additional wait time between step executions can help during debugging or to increase test stability.
(default: 0, milliseconds)
--enableUtf8Keyboard: "true" | "false". Enable the Repeato test automation keyboard.
Set this to "false" if you want to use the default keyboard of your device. (default: "true")
--outputDir: Override the default export path for batch run reports (default is: [workspaceDir]/batchRuns)
--logLevel: "WARN" | "INFO" | "DEBUG" (default: "INFO")
--force: Ignore errors (DB version mismatch) and execute anyway
--licenseKey: License key to unlock full feature set of Repeato-CLI
Examples:
$ npx @repeato/cli-testrunner --workspaceDir C:/path/to/your/workspace
List all batches in your workspace
$ npx @repeato/cli-testrunner --workspaceDir C:/path/to/your/workspace --batchId 278962-W73KOl2-SIUSZ
Executes all the tests in the given batch
[workspaceDir]/[testId]/test.json
[workspaceDir]/[testId]/testRuns/[deviceId]/
[workspaceDir]/batchRuns
directory. The exported directory can be shared via a webserver to make the report accessible to your QA team.[workspaceDir]/batchReports/[your batch report]
directorySupported Node.js version: 16 (v16.13.0 is tested).
You can use nvm to switch to the right Node.js version:
nvm use 16
.
Supported operating systems: MacOS, Windows, Linux
For Apple Sillicon (M1 / ARM architecture), you need to use Node.js v16
Simply execute
npx @repeato/cli-testrunner [args]
We have a couple of guides on how to install Android emulators or iOS simulators on your target system here: https://www.repeato.app/documentation/virtual-test-devices/
On Android you can use ADB to push your APK to the virtual device.
adb push /path/to/myApp.apk
On iOS you can use IDB
idb install /path/to/myApp.app
We tested our CLI test runner with following services:
You can find some example workflows here: https://www.repeato.app/documentation/continuous-integration/
In most cases Repeato should deliver the same results as Repeato Studio. We are actually using the same code base for both.
However, it really also depends on how the tests and the app is designed.
However, there are limits: Here is an example where Studio and CLI could deliver different results: Let's say your app is designed in a way, that a button appears on stage, but it's not clickable for 100ms (because it was coded this way. Maybe there is a server request involved, ...). Let's further assume Repeato-Studio (running on an older workstation) executes slower than the CLI (which is running on a fast server).
Repeato Studio (being slower) would click the button quite late (150ms delay), the test would run through. Repeato CLI (being fast) would click the button quite early (50ms delay), but the button would not be ready and therefore not trigger an action.
Here are some options of what you can try to solve the issue:
--waitDurationBetweenSteps
flag that could be used to make it wait between steps.FAQs
Headless node.js test runner for Repeato mobile UI tests
The npm package @repeato/cli-testrunner receives a total of 271 weekly downloads. As such, @repeato/cli-testrunner popularity was classified as not popular.
We found that @repeato/cli-testrunner demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.