π Playwright μ€μ
configs/playwright-config
μν¬μ€νμ΄μ€λ λͺ¨λ
Έλ ν¬ λ΄ μ¬λ¬ ν¨ν€μ§μ μ±μμ 곡ν΅μΌλ‘ μ¬μ©ν μ μλ Playwright ν
μ€νΈ μ€μ (곡μ config)μ μ 곡ν©λλ€.
μ£Όμ λͺ©μ
- νλ‘μ νΈ μ λ°μ κ±Έμ³ μΌκ΄λ E2E ν μ€νΈ νκ²½κ³Ό Playwright μ΅μ μ μ μ§ν©λλ€.
- κ° μν¬μ€νμ΄μ€(μ±/ν¨ν€μ§)μμ μ΄ μ€μ μ νμ₯νκ±°λ κ·Έλλ‘ μ¬μ©ν μ μμ΅λλ€.
μ£Όμ ꡬμ±
base.ts
λͺ¨λ ν¨ν€μ§/μ±μ κ³΅ν΅ μ μ©λλ κΈ°λ³Έ Playwright μ΅μ μ μ μν©λλ€.
μ¬μ© λ°©λ²
νμ₯νκΈ°
κ° μν¬μ€νμ΄μ€μ playwright.config.ts
μμ @repo/playwright-config/{configλͺ
}
μ import νμ¬ μ¬μ©ν μ μμ΅λλ€.
tools/playwright-web/playwright.config.ts
import { defineConfig } from "@playwright/test";
import base from "@repo/playwright-config/base";
/**
* Read environment variables from file.
* https://github.com/motdotla/dotenv
*/
// import dotenv from 'dotenv';
// import path from 'path';
// dotenv.config({ path: path.resolve(__dirname, '.env') });
/**
* See https://playwright.dev/docs/test-configuration.
*/
export default defineConfig({
...base,
reporter: [["list"], ["junit", { outputFile: "test-results/junit.xml" }]],
});
μ°Έκ³
- μ€μ μ΅μ
λ° μμΈ μ€μ μ
configs/playwright-config
μν¬μ€νμ΄μ€μ κ° config νμΌμ μ°Έκ³ νμΈμ. - μλ‘μ΄ κ³΅ν΅ μ΅μ μ΄ νμνλ€λ©΄ μ΄ μν¬μ€νμ΄μ€μ μΆκ°νμ¬ μ 체 νλ‘μ νΈμ μ μ©ν μ μμ΅λλ€.
Last updated on