QA
Quality Assurance
Quality assurance. Software testing and quality management activities.
Quality Assurance
Quality assurance. Software testing and quality management activities.
QA (Quality Assurance) is a set of activities that verify whether software meets requirements, works without defects, and provides users with a good experience. It goes beyond simply finding bugs to ensure quality across the entire development process.
QA is based on the testing pyramid: unit tests (70%) > integration tests (20%) > E2E tests (10%). It is efficient to automate unit tests extensively and quickly, and to automate only the core scenarios for E2E tests.
Modern QA emphasizes Shift-Left (moving testing to the early stages of development) and test automation. Automated tests are integrated into the CI/CD pipeline to verify quality on every commit. Tools such as Selenium, Cypress, and Playwright are widely used.
In practice, QA engineers are responsible for test case design, writing automation scripts, performance/security testing, bug triage, and managing release quality gates. Test coverage of 80% or higher and zero critical bugs are typical release criteria.
// Playwright E2E ํ
์คํธ ์์
import { test, expect } from '@playwright/test';
// ํ
์คํธ ์ค์
test.describe('๋ก๊ทธ์ธ ๊ธฐ๋ฅ', () => {
test.beforeEach(async ({ page }) => {
await page.goto('https://app.example.com/login');
});
// ์ ์ ๋ก๊ทธ์ธ ํ
์คํธ
test('์ฌ๋ฐ๋ฅธ ์๊ฒฉ์ฆ๋ช
์ผ๋ก ๋ก๊ทธ์ธ ์ฑ๊ณต', async ({ page }) => {
// Given: ๋ก๊ทธ์ธ ํ์ด์ง์ ์์
await expect(page).toHaveTitle(/๋ก๊ทธ์ธ/);
// When: ์ฌ๋ฐ๋ฅธ ์ด๋ฉ์ผ๊ณผ ๋น๋ฐ๋ฒํธ ์
๋ ฅ
await page.fill('[data-testid="email-input"]', 'user@example.com');
await page.fill('[data-testid="password-input"]', 'ValidPassword123!');
await page.click('[data-testid="login-button"]');
// Then: ๋์๋ณด๋๋ก ์ด๋
await expect(page).toHaveURL(/.*dashboard/);
await expect(page.locator('[data-testid="welcome-message"]'))
.toContainText('ํ์ํฉ๋๋ค');
});
// ์คํจ ์ผ์ด์ค ํ
์คํธ
test('์๋ชป๋ ๋น๋ฐ๋ฒํธ๋ก ๋ก๊ทธ์ธ ์คํจ', async ({ page }) => {
await page.fill('[data-testid="email-input"]', 'user@example.com');
await page.fill('[data-testid="password-input"]', 'WrongPassword');
await page.click('[data-testid="login-button"]');
// ์๋ฌ ๋ฉ์์ง ํ์ธ
await expect(page.locator('[data-testid="error-message"]'))
.toBeVisible();
await expect(page.locator('[data-testid="error-message"]'))
.toContainText('์ด๋ฉ์ผ ๋๋ ๋น๋ฐ๋ฒํธ๊ฐ ์ฌ๋ฐ๋ฅด์ง ์์ต๋๋ค');
// URL์ด ๋ณ๊ฒฝ๋์ง ์์
await expect(page).toHaveURL(/.*login/);
});
// ์
๋ ฅ ์ ํจ์ฑ ๊ฒ์ฌ ํ
์คํธ
test('์ด๋ฉ์ผ ํ์ ์ ํจ์ฑ ๊ฒ์ฌ', async ({ page }) => {
await page.fill('[data-testid="email-input"]', 'invalid-email');
await page.click('[data-testid="login-button"]');
await expect(page.locator('[data-testid="email-error"]'))
.toContainText('์ฌ๋ฐ๋ฅธ ์ด๋ฉ์ผ ํ์์ด ์๋๋๋ค');
});
});
// API ํ
์คํธ (Jest + Supertest)
import request from 'supertest';
import app from '../src/app';
describe('์ฌ์ฉ์ API', () => {
let authToken: string;
beforeAll(async () => {
// ํ
์คํธ์ฉ ์ธ์ฆ ํ ํฐ ๋ฐ๊ธ
const res = await request(app)
.post('/api/auth/login')
.send({ email: 'test@example.com', password: 'testpass' });
authToken = res.body.token;
});
test('GET /api/users - ์ฌ์ฉ์ ๋ชฉ๋ก ์กฐํ', async () => {
const response = await request(app)
.get('/api/users')
.set('Authorization', `Bearer ${authToken}`)
.expect('Content-Type', /json/)
.expect(200);
expect(response.body).toHaveProperty('users');
expect(Array.isArray(response.body.users)).toBe(true);
expect(response.body.users.length).toBeGreaterThan(0);
});
test('POST /api/users - ํ์ ํ๋ ๋๋ฝ ์ 400 ์๋ฌ', async () => {
const response = await request(app)
.post('/api/users')
.set('Authorization', `Bearer ${authToken}`)
.send({ name: 'Test User' }) // email ํ๋ ๋๋ฝ
.expect(400);
expect(response.body.error).toContain('email');
});
});
// ํ
์คํธ ์ปค๋ฒ๋ฆฌ์ง ์ค์ (jest.config.js)
module.exports = {
collectCoverageFrom: ['src/**/*.{js,ts}', '!src/**/*.d.ts'],
coverageThreshold: {
global: {
branches: 80,
functions: 80,
lines: 80,
statements: 80,
},
},
};
Senior: "What is the QA progress for this release? Are there any critical bugs?"
Junior: "Of the 242 total test cases, 230 passed, and we found 1 critical and 3 major bugs. The critical one is an issue in the payment module, and we plan to fix it today."
Interviewer: "Please tell us about your experience with test automation."
Candidate: "I automated 50 E2E test cases with Playwright and integrated them into CI so they run on every PR. I reduced manual testing time from a full day to 30 minutes, and the regression bug detection rate also increased by 40%."
Take a mock interview on this topic โ WIA SOOM AI Interview ยท Start for free
Reviewer: "This feature has no test code. Please write tests for at least the core scenarios."
Developer: "Yes, I'll add unit tests for both the normal case and the error case. I'll include edge cases as well."