mobile-app-testing by secondsky/claude-skills
npx skills add https://github.com/secondsky/claude-skills --skill mobile-app-testing为移动应用程序实施全面的测试策略。
| 层级 | 工具 | 覆盖率 |
|---|---|---|
| 单元测试 | Jest, XCTest, JUnit | 70% |
| 集成测试 | Detox, Espresso | 20% |
| 端到端测试 | Appium, Detox | 10% |
// Unit test
describe('CartService', () => {
it('calculates total correctly', () => {
const cart = new CartService();
cart.addItem({ price: 10, quantity: 2 });
expect(cart.getTotal()).toBe(20);
});
});
// E2E test (Detox)
describe('Login flow', () => {
beforeEach(async () => {
await device.reloadReactNative();
});
it('should login successfully', async () => {
await element(by.id('email-input')).typeText('user@example.com');
await element(by.id('password-input')).typeText('password123');
await element(by.id('login-button')).tap();
await expect(element(by.id('dashboard'))).toBeVisible();
});
});
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
func testLoginSuccess() {
let app = XCUIApplication()
app.launch()
app.textFields["email"].tap()
app.textFields["email"].typeText("user@example.com")
app.secureTextFields["password"].typeText("password123")
app.buttons["Login"].tap()
XCTAssertTrue(app.staticTexts["Welcome"].exists)
}
@Test
fun loginSuccess() {
onView(withId(R.id.email)).perform(typeText("user@example.com"))
onView(withId(R.id.password)).perform(typeText("password123"))
onView(withId(R.id.loginButton)).perform(click())
onView(withId(R.id.dashboard)).check(matches(isDisplayed()))
}
每周安装次数
74
代码仓库
GitHub 星标数
93
首次出现
2026年1月23日
安全审计
安装于
claude-code67
gemini-cli60
cursor59
codex58
opencode58
github-copilot55
Implement comprehensive testing strategies for mobile applications.
| Level | Tools | Coverage |
|---|---|---|
| Unit | Jest, XCTest, JUnit | 70% |
| Integration | Detox, Espresso | 20% |
| E2E | Appium, Detox | 10% |
// Unit test
describe('CartService', () => {
it('calculates total correctly', () => {
const cart = new CartService();
cart.addItem({ price: 10, quantity: 2 });
expect(cart.getTotal()).toBe(20);
});
});
// E2E test (Detox)
describe('Login flow', () => {
beforeEach(async () => {
await device.reloadReactNative();
});
it('should login successfully', async () => {
await element(by.id('email-input')).typeText('user@example.com');
await element(by.id('password-input')).typeText('password123');
await element(by.id('login-button')).tap();
await expect(element(by.id('dashboard'))).toBeVisible();
});
});
func testLoginSuccess() {
let app = XCUIApplication()
app.launch()
app.textFields["email"].tap()
app.textFields["email"].typeText("user@example.com")
app.secureTextFields["password"].typeText("password123")
app.buttons["Login"].tap()
XCTAssertTrue(app.staticTexts["Welcome"].exists)
}
@Test
fun loginSuccess() {
onView(withId(R.id.email)).perform(typeText("user@example.com"))
onView(withId(R.id.password)).perform(typeText("password123"))
onView(withId(R.id.loginButton)).perform(click())
onView(withId(R.id.dashboard)).check(matches(isDisplayed()))
}
Weekly Installs
74
Repository
GitHub Stars
93
First Seen
Jan 23, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
claude-code67
gemini-cli60
cursor59
codex58
opencode58
github-copilot55
Skills CLI 使用指南:AI Agent 技能包管理器安装与管理教程
46,600 周安装