Mobile App Testing

Mobile App Testing

Covers mobile app testing for iOS and Android: unit, UI, integration and performance tests, and automation with Detox, Appium, XCTest and Espresso.

Skill files7 files

references/

scripts/

templates/

SKILL.md102 lines
1
---
2
name: mobile-app-testing
3
description: >
4
Comprehensive mobile app testing strategies for iOS and Android. Covers unit
5
tests, UI tests, integration tests, performance testing, and test automation
6
with Detox, Appium, and XCTest.
7
---
8
9
# Mobile App Testing
10
11
## Table of Contents
12
13
- [Overview](#overview)
14
- [When to Use](#when-to-use)
15
- [Quick Start](#quick-start)
16
- [Reference Guides](#reference-guides)
17
- [Best Practices](#best-practices)
18
19
## Overview
20
21
Implement comprehensive testing strategies for mobile applications including unit tests, UI tests, integration tests, and performance testing.
22
23
## When to Use
24
25
- Creating reliable mobile applications with test coverage
26
- Automating UI testing across iOS and Android
27
- Performance testing and optimization
28
- Integration testing with backend services
29
- Regression testing before releases
30
31
## Quick Start
32
33
Minimal working example:
34
35
```javascript
36
// Unit test with Jest
37
import { calculate } from "../utils/math";
38
39
describe("Math utilities", () => {
40
test("should add two numbers", () => {
41
expect(calculate.add(2, 3)).toBe(5);
42
});
43
44
test("should handle negative numbers", () => {
45
expect(calculate.add(-2, 3)).toBe(1);
46
});
47
});
48
49
// Component unit test
50
import React from "react";
51
import { render, screen } from "@testing-library/react-native";
52
import { UserProfile } from "../components/UserProfile";
53
54
describe("UserProfile Component", () => {
55
test("renders user name correctly", () => {
56
const mockUser = { id: "1", name: "John Doe", email: "john@example.com" };
57
render(<UserProfile user={mockUser} />);
58
59
expect(screen.getByText("John Doe")).toBeTruthy();
60
});
61
// ... (see reference guides for full implementation)
62
```
63
64
## Reference Guides
65
66
Detailed implementations in the `references/` directory:
67
68
| Guide | Contents |
69
|---|---|
70
| [React Native Testing with Jest & Detox](references/react-native-testing-with-jest-detox.md) | React Native Testing with Jest & Detox |
71
| [iOS Testing with XCTest](references/ios-testing-with-xctest.md) | iOS Testing with XCTest |
72
| [Android Testing with Espresso](references/android-testing-with-espresso.md) | Android Testing with Espresso |
73
| [Performance Testing](references/performance-testing.md) | Performance Testing |
74
75
## Best Practices
76
77
### ✅ DO
78
79
- Write tests for business logic first
80
- Use dependency injection for testability
81
- Mock external API calls
82
- Test both success and failure paths
83
- Automate UI testing for critical flows
84
- Run tests on real devices
85
- Measure performance on target devices
86
- Keep tests isolated and independent
87
- Use meaningful test names
88
- Maintain >80% code coverage
89
90
### ❌ DON'T
91
92
- Skip testing UI-critical flows
93
- Use hardcoded test data
94
- Ignore performance regressions
95
- Test implementation details
96
- Make tests flaky or unreliable
97
- Skip testing on actual devices
98
- Ignore accessibility testing
99
- Create interdependent tests
100
- Test without mocking APIs
101
- Deploy untested code
102

© AJ Geddes · MIT · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 14,621 prompts

More by @OpenSourceBuffGuy

See all
Sea turtle carrying floating film studio island prompt image

Sea turtle carrying floating film studio island

Draws a giant sea turtle carrying a floating island film studio through a starry sky, where fairies polish rough film strips into golden film.

image-prompt, nano-banana, 3d-render, cartoon, fantasy-world, creatures, animals, whimsical, dreamy, cinematic, dramatic-lighting, vibrant-colors, bokeh, miniature, widescreen, night-scene, illustration, concept-art, surreal, storytelling, clay-3d

Desert buggy escapes drones past industrial outpost prompt image

Desert buggy escapes drones past industrial outpost

Builds a 15-second desert chase video where a racer in an armored buggy escapes drones past an industrial outpost, using five reference images with set jobs.

video-prompt, hailuo, action, multi-shot, timed-beats, camera-movement, reference-image, character-consistency, negative-prompt, cinematic, sci-fi, cars, landscape, aerial-view, tracking-shot, photorealistic, sound-effects, structured-output, long-form, widescreen

1 view
Cozy Pixel Art Farm Island Village prompt image

Cozy Pixel Art Farm Island Village

Draws a cozy 16-bit pixel-art farming village across six small islands joined by bridges, with exact counts for buildings, animals and crops.

image-prompt, gpt-image, pixel-art, isometric, game-assets, concept-art, maps, worldbuilding, cozy, vibrant-colors, ocean, landscape, wide-shot, widescreen, game-development, video-games, structured-output, whimsical, summer, high-angle, aerial-view, animals, negative-prompt, cityscape

1 view

Reviews

Loading reviews…

Discussion

Loading comments…