Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Appwright is a test framework for e2e testing of mobile apps. Appwright builds on top of Appium, and can run tests on local devices, emulators, and remote device farms — for both iOS and Android.
Appwright is one integrated package that combines an automation driver, test runner and test reporter. To achieve this, Appwright uses the Playwright test runner internally, which is purpose-built for the e2e testing workflow.
Appwright exposes an ergonomic API to automate user actions. These actions auto-wait and auto-retry for UI elements to be ready and interactable, which makes your tests easier to read and maintain.
import { test, expect } from "appwright";
test("User can login", async ({ device }) => {
await device.getByText("Username").fill("admin");
await device.getByText("Password").fill("password");
await device.getByText("Login").tap();
});
Links to help you get started.
npm i --save-dev appwright
touch appwright.config.ts
// In appwright.config.ts
import { defineConfig, Platform } from "appwright";
export default defineConfig({
projects: [
{
name: "android",
use: {
platform: Platform.ANDROID,
device: {
provider: "emulator", // or 'local-device' or 'browserstack'
},
buildPath: "app-release.apk",
},
},
{
name: "ios",
use: {
platform: Platform.IOS,
device: {
provider: "emulator", // or 'local-device' or 'browserstack'
},
buildPath: "app-release.app", // Path to your .app file
},
},
],
});
platform
: The platform you want to test on, such as 'android' or 'ios'.
provider
: The device provider where you want to run your tests.
You can choose between browserstack
, lambdatest
, emulator
, or local-device
.
buildPath
: The path to your build file. For Android, it should be an APK file.
For iOS, if you are running tests on real device, it should be an .ipa
file. For running tests on an emulator, it should be a .app
file.
To run tests, you need to specify the project name with --project
flag.
npx appwright test --project android
npx appwright test --project ios
Appwright supports BrowserStack out of the box. To run tests on BrowserStack, configure the provider in your config.
{
name: "android",
use: {
platform: Platform.ANDROID,
device: {
provider: "browserstack",
// Specify device to run the tests on
// See supported devices: https://www.browserstack.com/list-of-browsers-and-platforms/app_automate
name: "Google Pixel 8",
osVersion: "14.0",
},
buildPath: "app-release.apk",
},
},
Appwright supports LambdaTest out of the box. To run tests on LambdaTest, configure the provider in your config.
{
name: "android",
use: {
platform: Platform.ANDROID,
device: {
provider: "lambdatest",
// Specify device to run the tests on
// See supported devices: https://www.lambdatest.com/list-of-real-devices
name: "Pixel 8",
osVersion: "14",
},
buildPath: "app-release.apk",
},
},
To run the sample project:
example
directory.cd example
npm install
Run the following command to execute tests on an Android emulator:
npx appwright test --project android
To run the tests on iOS simulator:
wikipedia.zip
filenpm run extract:app
npx appwright test --project ios
0.1.45
FAQs
E2E mobile app testing done right, with the Playwright test runner
We found that appwright demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.