Install any skill in seconds. Free to start, no credit card required.
Get Started Free →echovic/backend-testing-guide
后端测试编写指南,包括单元测试、集成测试和E2E测试的编写方法和最佳实践
Passed 20 of 25 test cases with the skill, and 15 of 25 without it.
and 6 more in the full report
6 fixed14 passed either way4 still failing1 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 6 test cases the skill fixed. Same model, same prompt, with and without the skill.
We are adding a user profile feature to our API. Could you create the test suites for the user service logic and API endpoints, including a full user lifecycle test? After writing the tests, output a final report detailing the list of test files created, pass/fail counts, coverage percentage, and E2E verification status.
| Checked | Without skill | With skill |
|---|---|---|
| Includes section header '**测试添加**' | Missed | Passed |
| Includes section header '**测试结果**' | Missed | Passed |
| Includes bullet item containing '覆盖率:' | Missed | Passed |
The instructions your model reads when the skill loads.
职责边界: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');
test cases passed, vs 15 / 25 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.