# Jest - Mobile Testing Documentation

Last updated on : 09 Jan 2026

Jest is a JavaScript testing framework designed to ensure correctness of any JavaScript codebase. It works seamlessly with projects using Babel, TypeScript, Node, React, Angular, Vue, and more. Jest is well-documented, requires minimal configuration, and can be extended to match your testing requirements.

## Key Features:

- Approachable and feature-rich API for quick test results
- Minimal setup and configuration required
- Supports mobile app testing on both iOS and Android platforms via Pcloudy
- Integrates easily with modern JavaScript projects
- Extensible to match specific project requirements

### Prerequisites

Before setting up Jest for mobile testing, ensure you have:

1.  Node.js and NPM - Latest versions recommended
2.  Pcloudy Account - Active account with valid credentials
3.  API Access Key - Available in your account profile or Quick Actions tab
4.  Mobile App Upload - Your Android (.apk) or iOS (.ipa) application uploaded to Pcloudy via the web interface
5.  Project Files - Access to your test project repository

### Setup Instructions

1. Install Dependencies

Navigate to your project directory and run the following command to install required packages (including Jest) from package.json:

```java
npm i
```

2. Configure Test Environment

Edit the singleDevice.test.js file with your credentials. The sample below shows the basic structure—refer to the Capability Generator page for a complete customized configuration tailored to your needs:

```java
Pcloudy_Username = "your-email@example.com"
Pcloudy_ApiKey = "your-api-access-key"
```

### Configuration Parameters:

- Pcloudy_Username: Your registered email address

- Pcloudy_ApiKey: Your API access key (found in account profile or Quick Actions tab)

### Running Tests

Single Device Execution

Open the terminal in your project directory and execute:

```java
npm test singleDevice.test.js
```

This command will launch the Jest test suite on a single mobile device in the Pcloudy cloud.

### Troubleshooting

Common Issues:

- Authentication failed - Verify your username and API key are correct in the test file

- App not found - Ensure the app is uploaded and filename matches exactly in configuration

- Device not available - Check device name spelling or try a different device

- Dependencies not installed - Run npm i to ensure all packages are installed

### Additional Resources

- Complete sample project for Jest: Pcloudy GitHub Repository
- Support: support@pcloudy.com
