← 홈

🌲

⌘K
🤖
Claude Code AI 도구
🤗
Hugging Face AI 도구
🦜
LangChain AI 도구
🧠
Keras AI 도구
🦙
Ollama AI 도구
🐍
Python 프로그래밍 언어
🟨
JavaScript 프로그래밍 언어
🔷
TypeScript 프로그래밍 언어
⚛️
React 프로그래밍 언어
🐹
Go 프로그래밍 언어
🦀
Rust 프로그래밍 언어
📊
MATLAB 프로그래밍 언어
🗄️
SQL 프로그래밍 언어
⚙️
C/C++ 프로그래밍 언어
Java 프로그래밍 언어
🟣
C# 프로그래밍 언어
🍎
Swift 프로그래밍 언어
🟠
Kotlin 프로그래밍 언어
Next.js 프로그래밍 언어
💚
Vue.js 프로그래밍 언어
🔥
Svelte 프로그래밍 언어
🎨
Tailwind CSS 프로그래밍 언어
💚
Node.js 프로그래밍 언어
🌐
HTML 프로그래밍 언어
🎨
CSS/SCSS 프로그래밍 언어
🐘
PHP 프로그래밍 언어
💎
Ruby 프로그래밍 언어
🔴
Scala 프로그래밍 언어
📊
R 프로그래밍 언어
🎯
Dart 프로그래밍 언어
💧
Elixir 프로그래밍 언어
🌙
Lua 프로그래밍 언어
🐪
Perl 프로그래밍 언어
🅰️
Angular 프로그래밍 언어
🚂
Express.js 프로그래밍 언어
🐱
NestJS 프로그래밍 언어
🛤️
Ruby on Rails 프로그래밍 언어
◼️
GraphQL 프로그래밍 언어
🟪
Haskell 프로그래밍 언어
💚
Nuxt.js 프로그래밍 언어
🔷
SolidJS 프로그래밍 언어
htmx 프로그래밍 언어
💻
VS Code 개발 도구
🧠
PyCharm 개발 도구
📓
Jupyter 개발 도구
🧠
IntelliJ IDEA 개발 도구
💚
Neovim 개발 도구
🔮
Emacs 개발 도구
🔀
Git DevOps & CLI
🐳
Docker DevOps & CLI
☸️
Kubernetes DevOps & CLI
☁️
AWS CLI DevOps & CLI
🔄
GitHub Actions DevOps & CLI
🐧
Linux 명령어 DevOps & CLI
💻
Bash 스크립팅 DevOps & CLI
🌐
Nginx DevOps & CLI
📝
Vim DevOps & CLI
🔨
Makefile DevOps & CLI
🧪
Pytest DevOps & CLI
🪟
Windows DevOps & CLI
📦
패키지 매니저 DevOps & CLI
🍎
macOS DevOps & CLI
🏗️
Terraform DevOps & CLI
🔧
Ansible DevOps & CLI
Helm DevOps & CLI
🔨
Jenkins DevOps & CLI
🔥
Prometheus DevOps & CLI
📊
Grafana DevOps & CLI
💻
Zsh DevOps & CLI
🐟
Fish Shell DevOps & CLI
💙
PowerShell DevOps & CLI
🔄
Argo CD DevOps & CLI
🔀
Traefik DevOps & CLI
☁️
Azure CLI DevOps & CLI
☁️
Google Cloud CLI DevOps & CLI
📟
tmux DevOps & CLI
🔧
jq DevOps & CLI
✂️
sed DevOps & CLI
📊
awk DevOps & CLI
🌊
Apache Airflow DevOps & CLI
🔢
NumPy 데이터베이스 & 데이터
🐼
Pandas 데이터베이스 & 데이터
🔥
PyTorch 데이터베이스 & 데이터
🧠
TensorFlow 데이터베이스 & 데이터
📈
Matplotlib 데이터베이스 & 데이터
🐘
PostgreSQL 데이터베이스 & 데이터
🐬
MySQL 데이터베이스 & 데이터
🍃
MongoDB 데이터베이스 & 데이터
🔴
Redis 데이터베이스 & 데이터
🔍
Elasticsearch 데이터베이스 & 데이터
🤖
Scikit-learn 데이터베이스 & 데이터
👁️
OpenCV 데이터베이스 & 데이터
Apache Spark 데이터베이스 & 데이터
🪶
SQLite 데이터베이스 & 데이터
Supabase 데이터베이스 & 데이터
🔵
Neo4j 데이터베이스 & 데이터
📨
Apache Kafka 데이터베이스 & 데이터
🐰
RabbitMQ 데이터베이스 & 데이터
🔤
Regex 유틸리티
📝
Markdown 유틸리티
📄
LaTeX 유틸리티
🔐
SSH & GPG 유틸리티
🌐
curl & HTTP 유틸리티
📜
reStructuredText 유틸리티
🚀
Postman 유틸리티
🎬
FFmpeg 유틸리티
🖼️
ImageMagick 유틸리티
🔍
ripgrep 유틸리티
🔍
fzf 유틸리티
📗
Microsoft Excel 오피스 애플리케이션
📘
Microsoft Word 오피스 애플리케이션
📙
Microsoft PowerPoint 오피스 애플리케이션
📝
한컴 한글 한컴오피스
📽️
한컴 한쇼 한컴오피스
📊
한컴 한셀 한컴오피스
📄
Google 문서 Google Workspace
📊
Google 스프레드시트 Google Workspace
📽️
Google 프레젠테이션 Google Workspace
🔌
Cadence Virtuoso EDA & 하드웨어
⚙️
Synopsys EDA EDA & 하드웨어
💎
Verilog & VHDL EDA & 하드웨어
LTSpice EDA & 하드웨어
🔧
KiCad EDA & 하드웨어
📝
Notion 생산성 도구
💎
Obsidian 생산성 도구
💬
Slack 생산성 도구
🎮
Discord 생산성 도구
🎨
Figma 디자인 도구
📘
Confluence Atlassian
📋
Jira Atlassian
🃏
Jest 테스팅
Vitest 테스팅
🎭
Playwright 테스팅
🌲
Cypress 테스팅
🌐
Selenium 테스팅
💙
Flutter 모바일 개발
📱
React Native 모바일 개발
🍎
SwiftUI 모바일 개발
📱
Expo 모바일 개발
🐍
Django 웹 프레임워크
FastAPI 웹 프레임워크
🌶️
Flask 웹 프레임워크
🍃
Spring Boot 웹 프레임워크
🍸
Gin 웹 프레임워크
Vite 빌드 도구
📦
Webpack 빌드 도구
esbuild 빌드 도구
🐘
Gradle 빌드 도구
🪶
Maven 빌드 도구
🔧
CMake 빌드 도구
🎮
Unity 게임 개발
🤖
Godot 게임 개발
🔌
Arduino 임베디드 & IoT
🔍
Nmap 보안
🐕
Datadog 모니터링
📖
Swagger/OpenAPI 문서화
검색 결과가 없습니다
EN KO

기초

CLI 명령어

npm install -D cypress Cypress 설치
npx cypress open Cypress 앱 열기
npx cypress run 헤드리스 테스트 실행
npx cypress run --browser chrome Chrome에서 실행
npx cypress run --spec "cypress/e2e/login.cy.js" 특정 스펙 실행
npx cypress run --headed 브라우저 표시하여 실행
npx cypress run --record 대시보드에 기록
npx cypress verify 설치 확인

테스트 구조

기본 테스트
describe('Login Page', () => {
  beforeEach(() => {
    cy.visit('/login');
  });

  it('displays login form', () => {
    cy.get('[data-cy=email]').should('be.visible');
    cy.get('[data-cy=password]').should('be.visible');
  });

  it('logs in successfully', () => {
    cy.get('[data-cy=email]').type('user@example.com');
    cy.get('[data-cy=password]').type('password123');
    cy.get('[data-cy=submit]').click();
    cy.url().should('include', '/dashboard');
  });
});
설정
// cypress.config.js
const { defineConfig } = require('cypress');

module.exports = defineConfig({
  e2e: {
    baseUrl: 'http://localhost:3000',
    viewportWidth: 1280,
    viewportHeight: 720,
    video: true,
    screenshotOnRunFailure: true,
    defaultCommandTimeout: 10000,
    setupNodeEvents(on, config) {
      // Node event listeners
    },
  },
});

선택자

요소 가져오기

기본 선택자
cy.get('button');                    // CSS selector
cy.get('.class-name');                // Class
cy.get('#id');                        // ID
cy.get('[data-cy=submit]');           // Data attribute (recommended)
cy.get('[data-testid=button]');       // Test ID
cy.get('input[type="text"]');         // Attribute selector
요소 찾기
cy.contains('Submit');               // Text content
cy.contains('button', 'Submit');      // Element with text

// Chaining
cy.get('.form')
  .find('input')                      // Find within
  .first()                            // First element
  .last()                             // Last element
  .eq(2);                             // Element at index
순회
cy.get('li').parent();               // Parent element
cy.get('ul').children();              // Direct children
cy.get('div').siblings();             // Siblings
cy.get('span').closest('form');       // Closest ancestor
cy.get('ul').next();                  // Next sibling
cy.get('ul').prev();                  // Previous sibling
cy.get('div').filter('.active');      // Filter by selector

액션

사용자 액션

클릭 액션
cy.get('button').click();
cy.get('button').dblclick();          // Double click
cy.get('button').rightclick();        // Right click
cy.get('button').click({ force: true }); // Force click
cy.get('button').click('topRight');   // Click position
cy.get('button').click(80, 20);       // Click coordinates
입력 액션
cy.get('input').type('Hello World');
cy.get('input').type('text{enter}');  // With enter key
cy.get('input').type('{selectall}{backspace}'); // Clear
cy.get('input').type('{ctrl+a}');     // Keyboard shortcuts
cy.get('input').clear();              // Clear input
cy.get('input').type('slow', { delay: 100 }); // Slow typing
특수 키
{enter}       // Enter key
{backspace}   // Backspace
{del}         // Delete
{esc}         // Escape
{tab}         // Tab
{uparrow}     // Up arrow
{downarrow}   // Down arrow
{leftarrow}   // Left arrow
{rightarrow}  // Right arrow
{ctrl+a}      // Select all
{alt+f4}      // Alt+F4
{shift+tab}   // Shift+Tab
폼 액션
cy.get('select').select('Option 1');  // Select by text
cy.get('select').select('value1');    // Select by value
cy.get('input[type="checkbox"]').check();
cy.get('input[type="checkbox"]').uncheck();
cy.get('input[type="radio"]').check('value');
cy.get('input[type="file"]').selectFile('file.txt');
cy.get('form').submit();

기타 액션

스크롤 및 포커스
cy.get('element').scrollIntoView();
cy.scrollTo('bottom');
cy.scrollTo(0, 500);                  // x, y coordinates
cy.scrollTo('50%', '50%');            // Percentage
cy.get('input').focus();
cy.get('input').blur();
드래그 앤 드롭
cy.get('.draggable').trigger('mousedown', { button: 0 });
cy.get('.droppable').trigger('mousemove').trigger('mouseup');

// Or with drag command (requires plugin)
cy.get('.item').drag('.target');
호버
// Cypress doesn't have native hover
cy.get('button').trigger('mouseover');
cy.get('button').trigger('mouseenter');
cy.get('button').realHover(); // requires cypress-real-events

어설션

어설션

가시성
cy.get('button').should('be.visible');
cy.get('button').should('not.be.visible');
cy.get('button').should('exist');
cy.get('button').should('not.exist');
cy.get('button').should('be.hidden');
내용
cy.get('h1').should('have.text', 'Welcome');
cy.get('h1').should('contain', 'Welcome');
cy.get('h1').should('include.text', 'come');
cy.get('input').should('have.value', 'Hello');
cy.get('div').should('be.empty');
cy.get('div').should('not.be.empty');
속성 및 상태
cy.get('input').should('have.attr', 'placeholder');
cy.get('input').should('have.attr', 'type', 'text');
cy.get('a').should('have.attr', 'href', '/home');

cy.get('button').should('be.disabled');
cy.get('button').should('be.enabled');
cy.get('input').should('be.focused');
cy.get('checkbox').should('be.checked');
CSS 및 클래스
cy.get('div').should('have.class', 'active');
cy.get('div').should('not.have.class', 'hidden');
cy.get('div').should('have.css', 'display', 'flex');
cy.get('div').should('have.css', 'background-color', 'rgb(0, 0, 255)');
길이 및 다중
cy.get('li').should('have.length', 3);
cy.get('li').should('have.length.gt', 2);     // Greater than
cy.get('li').should('have.length.gte', 3);    // Greater or equal
cy.get('li').should('have.length.lt', 5);     // Less than
cy.get('li').should('have.length.lte', 3);    // Less or equal

// Multiple assertions
cy.get('button')
  .should('be.visible')
  .and('be.enabled')
  .and('contain', 'Submit');

네트워크

인터셉트 및 스텁

요청 인터셉트
// Intercept and alias
cy.intercept('GET', '/api/users').as('getUsers');
cy.visit('/');
cy.wait('@getUsers');

// Intercept with response stub
cy.intercept('GET', '/api/users', {
  statusCode: 200,
  body: [{ id: 1, name: 'John' }],
}).as('getUsers');
요청 수정
cy.intercept('POST', '/api/login', (req) => {
  // Modify request
  req.headers['Authorization'] = 'Bearer token';
  req.body.extra = 'data';

  // Continue with modified request
  req.continue();
});

cy.intercept('/api/*', (req) => {
  req.reply((res) => {
    // Modify response
    res.body.modified = true;
    res.send();
  });
});
요청 대기
cy.intercept('GET', '/api/users').as('users');
cy.visit('/');

// Wait and access response
cy.wait('@users').then((interception) => {
  expect(interception.response.statusCode).to.eq(200);
  expect(interception.response.body).to.have.length(3);
});

// Wait multiple times
cy.wait(['@users', '@posts']);
픽스처 응답
// cypress/fixtures/users.json
// [{ "id": 1, "name": "John" }]

cy.intercept('GET', '/api/users', {
  fixture: 'users.json',
}).as('getUsers');

// With delay
cy.intercept('GET', '/api/users', {
  fixture: 'users.json',
  delay: 1000,
});

커스텀 명령어

커스텀 명령어

명령어 추가
// cypress/support/commands.js
Cypress.Commands.add('login', (email, password) => {
  cy.visit('/login');
  cy.get('[data-cy=email]').type(email);
  cy.get('[data-cy=password]').type(password);
  cy.get('[data-cy=submit]').click();
  cy.url().should('include', '/dashboard');
});

// Usage in test
cy.login('user@example.com', 'password123');
API 로그인 명령어
Cypress.Commands.add('loginByApi', (email, password) => {
  cy.request({
    method: 'POST',
    url: '/api/login',
    body: { email, password },
  }).then((response) => {
    window.localStorage.setItem('token', response.body.token);
  });
});

// Much faster than UI login
cy.loginByApi('user@example.com', 'password');
명령어 덮어쓰기
Cypress.Commands.overwrite('visit', (originalFn, url, options) => {
  // Add auth header to all visits
  const token = localStorage.getItem('token');
  return originalFn(url, {
    ...options,
    onBeforeLoad(win) {
      win.localStorage.setItem('token', token);
    },
  });
});

유틸리티

유틸리티

대기 및 타임아웃
cy.wait(1000);                        // Wait 1 second

// Custom timeout
cy.get('button', { timeout: 10000 }).should('be.visible');

// Retry assertions
cy.get('button')
  .should('be.visible')
  .and('be.enabled');
브라우저 스토리지
// Local Storage
localStorage.setItem('key', 'value');
cy.window().then((win) => {
  win.localStorage.setItem('token', 'abc123');
});
cy.clearLocalStorage();

// Cookies
cy.setCookie('name', 'value');
cy.getCookie('name').should('have.property', 'value', 'value');
cy.clearCookies();

// Session Storage
cy.window().then((win) => {
  win.sessionStorage.setItem('key', 'value');
});
뷰포트
cy.viewport(1280, 720);
cy.viewport('iphone-x');
cy.viewport('macbook-15');

// Presets: iphone-6, iphone-x, samsung-s10
// ipad-2, macbook-11, macbook-13, macbook-15, macbook-16
스크린샷 및 비디오
cy.screenshot();                      // Auto-named
cy.screenshot('login-page');          // Named screenshot
cy.screenshot({ capture: 'fullPage' });

// cypress.config.js
module.exports = defineConfig({
  video: true,
  videosFolder: 'cypress/videos',
  screenshotsFolder: 'cypress/screenshots',
});