
studentofjs/mcp-frontend-testing
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
Model Context Protocol에 대한 프론트 엔드 테스트 도구
개요
이 MCP 서버는 다음을 포함하는 frontend 테스트를 위한 도구를 제공합니다: - : JavaScript/TypeScript 코드를 분석하여 적절한 테스트 전략을 결정합니다. - : Jest 및 Cypress에 대한 단위 및 구성 요소 테스트 생성. - : Jest 및 Cypress를 사용하여 테스트를 실행하고 결과를 반환합니다. - : React 컴포넌트를 테스트하기 위한 도구를 제공합니다. 1. \ git clone mcp-frontend-testing\ 2. \ CD mcp-frontend-testing\ 3. \npm 설치 \ - : 분석 코드 및 분석 결과를 반환합니다. - : - \code\ (string, required) : 분석하는 소스 코드. - \ 언어 \ (선택 enum,) : 코드의 언어 (\javascript\ | \typescript\ | \jsx\ | \tsx\, default: \javascript). - : 소스 코드 및 프레임 워크를 기반으로 테스트 코드 생성. - : - \code\ (문자, 필수) : 테스트를 생성하는 소스 코드. - \framework \ (enum, required) : 테스트 프레임 워크 (\jest\ | \cypress). - \type\ (enum, required) : 테스트 유형 (\unit\ | \component\ | \e2e).
개요(AI 번역)
묘사
이 MCP 서버는 다음을 포함하는 frontend 테스트를 위한 도구를 제공합니다:
-Code Analysis: 적절한 테스트 전략을 결정하기 위해 JavaScript/TypeScript 코드를 분석합니다.
- Test Generation: Jest와 Cypress를 위한 단위와 성분 시험을 생성하십시오.
- Test Running: Jest와 Cypress를 사용하여 테스트를 실행하고 결과를 반환합니다. -Component Testing: React 컴포넌트를 테스트하기 위한 도구를 제공합니다.
시작하기
설치
- ** 저장소 : ** `git clone mcp-frontend-testing`]
- ** 프로젝트 디렉토리에 Navigate:** `cd mcp-frontend-testing`
- 모든 의존성:
npm install\]
서버 실행
HTTP 수송
```bash
서버 구축
npm 실행 빌드
HTTP 수송 서버 시작
npm 실행 시작:http ```
Stdio 수송
```bash
서버 구축
npm 실행 빌드
Stdio 수송 서버 시작
npm 실행 시작:stdio ```
사용법
도구
- analyzeCode: 분석 코드 및 분석 결과를 반환합니다.
- ** 모수 **:
- `code` (문자,필수): 분석하는 소스 코드.
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
원문 README의 일부입니다. 원문 보기.
MCP Frontend Testing Server
Description
This MCP server provides tools for frontend testing, including:
- Code Analysis: Analyzes JavaScript/TypeScript code to determine appropriate testing strategies.
- Test Generation: Generates unit and component tests for Jest and Cypress.
- Test Running: Executes tests using Jest and Cypress and returns results.
- Component Testing: Provides a tool specifically for testing React components.
Getting Started
Installation
- Clone the repository: `git clone mcp-frontend-testing`
- Navigate to the project directory: `cd mcp-frontend-testing`
- Install dependencies: `npm install`
Running the Server
HTTP Transport
```bash
Build the server
npm run build
Start the server with HTTP transport
npm run start:http ```
Stdio Transport
```bash
Build the server
npm run build
Start the server with Stdio transport
npm run start:stdio ```
Usage
Tools
- analyzeCode: Analyzes code and returns analysis results.
- Parameters:
- `code` (string, required): The source code to analyze.
- `language` (enum, optional): Language of the code (`javascript` | `typescript` | `jsx` | `tsx`, default: `javascript`).
- Parameters:
- generateTest: Generates test code based on source code and framework.
- Parameters:
- `code` (string, required): The source code to generate tests for.
- `framework` (enum, required): Testing framework (`jest` | `cypress`).
- `type` (enum, required): Type of test (`unit` | `component` | `e2e`).
- `language` (enum, optional): Language of the code (`javascript` | `typescript` | `jsx` | `tsx`, default: `javascript`).
- `description` (string, optional): Description of the test case.
- Parameters:
- runTest: Runs tests and returns results.
- Parameters:
- `sourceCode` (string, required): The source code being tested.
- `testCode` (string, required): The test code to execute.
- `framework` (enum, required): Testing framework (`jest` | `cypress`).
- `type` (enum, required): Type of test (`unit` | `component` | `e2e`).
- `config` (record, optional): Configuration object for test execution.
- Parameters:
- testReactComponent: Runs component tests specifically for React components.
- Parameters:
- `componentCode` (string, required): The source code of the React component.
- `testCode` (string, optional): Test code for the component (auto-generated if not provided).
- `framework` (enum, optional): Testing framework (`jest` | `cypress`, default: `jest`).
- `props` (record, optional): Props to pass to the component during testing.
- Parameters:
설치
docker run -p 3000:3000 mcp-frontend-testing