You’re the Expert!

pynfinity

robot-framework

Cheatsheets
Jump to Topic

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

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

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

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

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

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

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