You’re the Expert!

robot-framework

Cheatsheets

Write a Simple Test Case in Robot Framework
*** Test Cases ***
Example Test
    Log    Hello, santoshtvk!
copy to clipboard
Use Variables in Robot Framework
*** Variables ***
${USERNAME}    pynfinity

*** Test Cases ***
Display Variable
    Log    Hello, ${USERNAME}!
copy to clipboard

Create and Use a Keyword
*** Keywords ***
Custom Keyword
    Log    Custom keyword executed by dhruv

*** Test Cases ***
Test Custom Keyword
    Custom Keyword
copy to clipboard
Read Data from an External File
*** Settings ***
Library    OperatingSystem

*** Test Cases ***
Read File
    ${content}=    Get File    data.txt
    Log    ${content}
copy to clipboard

Integrate Robot Framework with API Testing
*** Settings ***
Library    RequestsLibrary

*** Test Cases ***
Get API Response
    ${response}=    GET    https://api.pynfinity.com/data
    Log    ${response.json()}
copy to clipboard
Execute Parallel Test Cases with Pabot
pabot --processes 2 tests/
copy to clipboard