James Gibbard
@jgibbarduk
#PNSQC
Stressed engineering teams
Recent trend to use more complex software stacks
Software engineering teams are asked to…
Software Tester
COTS Test Automation Tools are not flexible enough for today's complex software stacks
Layers need testing separately & together
As a tester, I want my test automation toolbox to...
Generic keyword-driven test case language
Use keywords derived from different libraries or tools
The whole team can review, learn and suggest changes to automated test cases
Test cases or parts of test cases can be re-used
Promotes keyword resuse | Reduces test case creation time | Reduces maintenance costs |
Global settings, including importing your built-in and custom libraries
*** Settings ***
Library OperatingSystem
Library Database_Lib
Library UI_Lib
Library Common_Lib
*** Variables ***
${API-URL} http://localhost/api/user/create
${UI-URL}http://localhost/ui/users
*** Test Cases ***
TC01 – Verify new user is created (in Database) using API
[Tags] API Regression
Create User 'qa-user' ${API-URL}
Verify User in Database 'qa-user'
[Teardown] Purge User from Database 'qa-user'
TC02 – Verify new user is created (in UI) using API
[Tags] API Regression
Create User 'qa-user' ${API-URL}
Open Browser ${UI-URL} Chrome
Verify User in UI 'qa-user'
[Teardown] Purge User from Database 'qa-user'
Global variables that can be reused in multiple test cases
Test Case 01: Initially created to test the API & DB
Test Case 02: Reusing the ‘Create User’ keyword from TC01, but testing the UI
Tool/Library is unable to interact with software under test (e.g. bugs or poorly implemented functionality)
Make use of another tool/library to fill in the gap (i.e. augment your test case)
*** Settings ***
Library OperatingSystem
Library Database_Lib
Library UI_Lib
Library Common_Lib
*** Variables ***
${API-URL} http://localhost/api/user/create
${UI-URL} http://localhost/ui/users
*** Test Cases ***
TC02 – Verify new user is created (in UI) using API
[Tags] API Regression
Create User 'qa-user' ${API-URL}
Open Browser ${UI-URL} Chrome
Verify User in UI 'qa-user'
[Teardown] Purge User from Database 'qa-user'
*** Test Cases ***
TC02 – Verify new user is created (in UI) using API
[Tags] API Regression
Create User 'qa-user' ${API-URL}
UI_Lib.Open Browser ${UI-URL} Chrome
Verify User in UI 'qa-user'
[Teardown] Purge User from Database 'qa-user'
*** Settings ***
Library OperatingSystem
Library Database_Lib
Library UI_Lib
Library Common_Lib
Library CMD_Lib
*** Test Cases ***
TC02 – Verify new user is created (in UI) using API
[Tags] API Regression
Create User 'qa-user' ${API-URL}
CMD_Lib.Open Browser ${UI-URL} Chrome
Verify User in UI 'qa-user'
[Teardown] Purge User from Database 'qa-user'
*** Test Cases ***
TC02 – Verify new user is created (in UI) using API
[Tags] API Regression
Create User 'qa-user' ${API-URL}
UI_Lib.Open Browser ${UI-URL} Chrome
Verify User in UI 'qa-user'
[Teardown] Purge User from Database 'qa-user'
*** Settings ***
Library OperatingSystem
Library Database_Lib
Library UI_Lib
Library Common_Lib
@jgibbarduk
linkedin.com/in/jgibbarduk
jgibbard.me.uk
http://xkcd.com/327/