API test toegevoegd voor het toevoegen van klanten.
This commit is contained in:
19
Tests/Klant_Toevoegen_API.robot
Normal file
19
Tests/Klant_Toevoegen_API.robot
Normal file
@@ -0,0 +1,19 @@
|
||||
*** Settings ***
|
||||
Library RequestsLibrary
|
||||
Library FakerLibrary locale=nl_NL
|
||||
|
||||
*** Variables ***
|
||||
${BASE_URL} https://api-paypoint-test.melvanveen.nl/api
|
||||
${CUSTOMERS} /customers
|
||||
|
||||
*** Test Cases ***
|
||||
Nieuwe Klant Toevoegen
|
||||
[Documentation] Voegt een nieuwe klant toe met behulp van random data. Hiervoor wordt API gebruikt in plaats van de GUI.
|
||||
${voornaam}= FakerLibrary.First Name Nonbinary
|
||||
${achternaam}= FakerLibrary.Last Name
|
||||
${body}= Create Dictionary firstName=${voornaam} lastName=${achternaam} email=jejim33876@barodis.com
|
||||
${response}= POST ${BASE_URL}${CUSTOMERS} json=${body}
|
||||
Status Should Be 200 ${response}
|
||||
Should Be Equal As Strings ${voornaam} ${response.json()}[firstName]
|
||||
Should Be Equal As Strings ${achternaam} ${response.json()}[lastName]
|
||||
Should Be Equal As Strings jejim33876@barodis.com ${response.json()}[email]
|
||||
Reference in New Issue
Block a user