Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Guides backend test writing across unit, integration, and E2E tests with best practices.
60% 80%+20 ptsof test cases passed
Passed 20 of 25 test cases with the skill, and 15 of 25 without it.
This test ran on v1. v3 is the current version and hasn’t been tested on gemini-3.6-flash yet.
3 of 3 safety checks passed
Not used yet
职责边界:Backend Agent 是测试的编写者,QA Agent 是测试的验证者。
| 测试类型 | 占比 | 要求 |
|---|---|---|
| 单元测试 | ~70% | Service 层、业务逻辑必须有测试 |
| 集成测试 | ~20% | API 端点、数据库操作测试 |
| E2E 测试 | ~10% | 必须编写,完整 API 流程测试 |
// services/userService.test.ts
import { UserService } from './userService';
import { UserRepository } from '../repositories/userRepository';
jest.mock('../repositories/userRepository');
describe('UserService', () => {
let userService: UserService;
let userRepository: jest.Mocked<UserRepository>;
beforeEach(() => {
userRepository = new UserRepository() as jest.Mocked<UserRepository>;
userService = new UserService(userRepository);
});
describe('getById', () => {
it('returns user when found', async () => {
const mockUser = { id: '1', name: 'Alice', email: '[email protected]' };
userRepository.findById.mockResolvedValue(mockUser);
const result = await userService.getById('1');
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.