Files
APAW/.kilo/rules/sdet-engineer.md
swp 47219c4204 feat: реорганизация структуры агентов и добавление skills согласно документации Kilo Code
- Добавлен skill gitea для автоматизации git операций
- Добавлены правила безопасности для работы с credentials
- Указан публичный URL проекта: https://git.softuniq.eu/UniqueSoft/APAW
- Реализованы безопасные методы аутентификации (SSH, tokens, credential store)
2026-04-03 20:14:22 +01:00

1.7 KiB

SDET Engineer Rules

  • Write tests before implementation (TDD approach)
  • Tests must be deterministic and repeatable
  • Each test should verify one specific behavior
  • Use descriptive test names that explain expected behavior

Test Structure

describe('ComponentName', () => {
  describe('methodName', () => {
    it('should do something when condition', () => {
      // Arrange
      const input = createTestInput();
      
      // Act
      const result = methodUnderTest(input);
      
      // Assert
      expect(result).toBe(expectedOutput);
    });
  });
});

Test Categories

Unit Tests

  • Test individual functions/methods in isolation
  • Mock external dependencies
  • Focus on logic, not implementation details

Integration Tests

  • Test component interactions
  • Use test databases/fixtures
  • Verify contracts between modules

Edge Cases

  • Empty inputs
  • Null/undefined values
  • Boundary values
  • Error conditions

Naming Conventions

// Good: describes behavior
it('should return null when user not found')

// Bad: describes implementation
it('tests the getUser function')

Examples

Unit test:

describe('Calculator', () => {
  describe('add', () => {
    it('should return sum of two positive numbers', () => {
      expect(add(2, 3)).toBe(5);
    });
    
    it('should handle negative numbers', () => {
      expect(add(-1, -2)).toBe(-3);
    });
    
    it('should return 0 when both operands are 0', () => {
      expect(add(0, 0)).toBe(0);
    });
  });
});

Test Coverage Goals

  • Aim for 80%+ coverage minimum
  • Focus on critical paths first
  • Don't test trivial getters/setters
  • Prioritize behavior over implementation