Chuyển đến nội dung
Skillpedia
Kiểm thử48k · #5646

robot-framework-skill

Skill này làm gì

Tool này giúp tạo bài kiểm thử tự động cho website và API bằng ngôn ngữ Robot Framework. Nó tạo mã Python để kiểm tra mọi thứ có hoạt động như mong đợi hay không.

Khi nào nên dùng

  • ✓Khi bạn cần tạo bài kiểm thử cho một website.
  • ✓Khi bạn muốn kiểm tra xem một API có phản hồi đúng hay không.
  • ✓Khi bạn đang dùng hoặc muốn bắt đầu dùng Robot Framework.

Liên kết skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/robot-framework-skill/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/robot-framework-skill/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Tạo một bài kiểm thử Robot Framework để đăng nhập vào một website bằng tên người dùng và mật khẩu, rồi kiểm tra xem bảng điều khiển có hiển thị không.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Bạn mô tả điều muốn kiểm thử, và tool sẽ tạo code theo định dạng Robot Framework. Tool dùng các thư viện như Selenium để tương tác với website và Requests cho API.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Robot Framework Skill

When to Use

Use this skill when you need generates Robot Framework tests in keyword-driven syntax with Python. Supports SeleniumLibrary, RequestsLibrary, and custom keywords. Use when user mentions "Robot Framework", "*** Test Cases ", "SeleniumLibrary", ".robot file". Triggers on: "Robot Framework", " Test Cases ***",...

For TestMu AI cloud execution, see reference/cloud-integration.md and shared/testmu-cloud-reference.md.

Core Patterns

Basic Test (tests/login.robot)

*** Settings ***
Library    SeleniumLibrary
Suite Setup    Open Browser    ${BASE_URL}    chrome
Suite Teardown    Close All Browsers

*** Variables ***
${BASE_URL}    http://localhost:3000
${EMAIL}       user@test.com
${PASSWORD}    password123

*** Test Cases ***
Login With Valid Credentials
    Go To    ${BASE_URL}/login
    Wait Until Element Is Visible    id:email    10s
    Input Text    id:email    ${EMAIL}
    Input Text    id:password    ${PASSWORD}
    Click Button    css:button[type='submit']
    Wait Until Element Is Visible    css:.dashboard    10s
    Page Should Contain    Welcome
    Location Should Contain    /dashboard

Login With Invalid Credentials Shows Error
    Go To    ${BASE_URL}/login
    Input Text    id:email    wrong@test.com
    Input Text    id:password    wrong
    Click Button    css:button[type='submit']
    Wait Until Element Is Visible    css:.error    5s
    Element Should Contain    css:.error    Invalid credentials

Custom Keywords

*** Keywords ***
Login As User
    [Arguments]    ${email}    ${password}
    Go To    ${BASE_URL}/login
    Input Text    id:email    ${email}
    Input Text    id:password    ${password}
    Click Button    css:button[type='submit']

Verify Dashboard Is Displayed
    Wait Until Element Is Visible    css:.dashboard    10s
    Page Should Contain    Welcome

*** Test Cases ***
Valid Login Flow
    Login As User    user@test.com    password123
    Verify Dashboard Is Displayed

Data-Driven Tests (Template)

*** Test Cases ***
Login With Various Users
    [Template]    Login And Verify
    admin@test.com    admin123    Dashboard
    user@test.com     pass123     Dashboard
    bad@test.com      wrong       Error

*** Keywords ***
Login And Verify
    [Arguments]    ${email}    ${password}    ${expected}
    Login As User    ${email}    ${password}
    Page Should Contain    ${expected}

API Testing (RequestsLibrary)

*** Settings ***
Library    RequestsLibrary

*** Test Cases ***
Get Users Returns 200
    ${response}=    GET    ${API_URL}/users    expected_status=200
    Should Not Be Empty    ${response.json()['users']}

Create User
    ${body}=    Create Dictionary    name=Alice    email=alice@test.com
    ${response}=    POST    ${API_URL}/users    json=${body}    expected_status=201
    Should Be Equal    ${response.json()['name']}    Alice

Cloud Config

*** Settings ***
Library    SeleniumLibrary

*** Variables ***
${REMOTE_URL}    https://%{LT_USERNAME}:%{LT_ACCESS_KEY}@hub.lambdatest.com/wd/hub

*** Keywords ***
Open Cloud Browser
    ${caps}=    Create Dictionary
    ...    browserName=chrome    browserVersion=latest
    ...    LT:Options=${{{"build":"Robot Build","name":"Login Test","platform":"Windows 11","video":True}}}
    Open Browser    ${BASE_URL}    remote_url=${REMOTE_URL}    desired_capabilities=${caps}

Setup: pip install robotframework robotframework-seleniumlibrary robotframework-requests

Run: robot tests/ or robot --include smoke tests/

Report: report.html and log.html auto-generated

Deep Patterns

See reference/playbook.md for production-grade patterns:

Section What You Get
§1 Project Setup Project structure, variable files, execution commands, pabot
§2 Web UI Testing Login tests with Page Objects, dynamic content, waits, modals
§3 API Testing CRUD with RequestsLibrary, error handling, validation, auth
§4 Data-Driven Testing DataDriver with CSV, FOR loops, bulk operations
§5 Custom Python Libraries @keyword decorator, resource tracking, test data generation

…

Câu hỏi thường gặp

Robot Framework là gì?

Đó là một framework mã nguồn mở dùng để tự động hóa kiểm thử và Robotic Process Automation (RPA). Nó dùng cú pháp dễ đọc, gần giống ngôn ngữ tự nhiên.

Nó hỗ trợ những thư viện nào?

Nó hỗ trợ các thư viện phổ biến như SeleniumLibrary (kiểm thử giao diện web) và RequestsLibrary (kiểm thử API), đồng thời cho phép dùng các từ khóa tùy chỉnh.

Tôi chạy các bài kiểm thử đã tạo như thế nào?

Bạn có thể chạy bằng lệnh 'robot' trong terminal, sau khi cài các phụ thuộc cần thiết bằng 'pip install robotframework robotframework-seleniumlibrary robotframework-requests'.

Chi tiết

Mô tả gốc của tác giả

Generates Robot Framework tests in keyword-driven syntax with Python. Supports SeleniumLibrary, RequestsLibrary, and custom keywords. Use when user mentions \"Robot Framework\", \"*** Test Cases ***\", \"SeleniumLibrary\", \".robot file\".

repo: sickn33/agentic-awesome-skills

Độ phổ biến

Sao GitHub
48k
Vị trí xếp hạng
#5646
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự