Creating Automation test cases for POST

4 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
One-time Fee
$49.99
List Price:  $69.99
You save:  $20
€43.61
List Price:  €61.05
You save:  €17.44
£37.36
List Price:  £52.31
You save:  £14.94
CA$68.93
List Price:  CA$96.51
You save:  CA$27.57
A$78.36
List Price:  A$109.71
You save:  A$31.35
S$64.64
List Price:  S$90.50
You save:  S$25.86
HK$392.42
List Price:  HK$549.42
You save:  HK$157
CHF 40.92
List Price:  CHF 57.29
You save:  CHF 16.37
NOK kr509.15
List Price:  NOK kr712.85
You save:  NOK kr203.70
DKK kr325.32
List Price:  DKK kr455.48
You save:  DKK kr130.15
NZ$84.89
List Price:  NZ$118.86
You save:  NZ$33.96
د.إ183.58
List Price:  د.إ257.03
You save:  د.إ73.44
৳6,131.77
List Price:  ৳8,584.97
You save:  ৳2,453.19
₹4,338.85
List Price:  ₹6,074.75
You save:  ₹1,735.89
RM214.70
List Price:  RM300.60
You save:  RM85.90
₦77,667.96
List Price:  ₦108,741.36
You save:  ₦31,073.40
₨14,226.67
List Price:  ₨19,918.47
You save:  ₨5,691.80
฿1,650.94
List Price:  ฿2,311.45
You save:  ฿660.51
₺1,985.67
List Price:  ₺2,780.09
You save:  ₺794.42
B$277.98
List Price:  B$389.20
You save:  B$111.21
R905.67
List Price:  R1,268.01
You save:  R362.34
Лв85.23
List Price:  Лв119.33
You save:  Лв34.10
₩69,478.37
List Price:  ₩97,275.28
You save:  ₩27,796.91
₪173.87
List Price:  ₪243.43
You save:  ₪69.56
₱2,877.27
List Price:  ₱4,028.41
You save:  ₱1,151.13
¥7,397.62
List Price:  ¥10,357.27
You save:  ¥2,959.64
MX$962.38
List Price:  MX$1,347.41
You save:  MX$385.03
QR182.85
List Price:  QR256.01
You save:  QR73.15
P675.75
List Price:  P946.10
You save:  P270.35
KSh6,461.20
List Price:  KSh9,046.20
You save:  KSh2,585
E£2,533.37
List Price:  E£3,546.92
You save:  E£1,013.55
ብር6,894.42
List Price:  ብር9,652.75
You save:  ብር2,758.32
Kz45,588.63
List Price:  Kz63,827.73
You save:  Kz18,239.10
CLP$47,160.37
List Price:  CLP$66,028.30
You save:  CLP$18,867.92
CN¥359.32
List Price:  CN¥503.08
You save:  CN¥143.76
RD$2,973.16
List Price:  RD$4,162.67
You save:  RD$1,189.50
DA6,525.23
List Price:  DA9,135.85
You save:  DA2,610.61
FJ$113.66
List Price:  FJ$159.14
You save:  FJ$45.47
Q385.33
List Price:  Q539.49
You save:  Q154.16
GY$10,489.26
List Price:  GY$14,685.80
You save:  GY$4,196.54
ISK kr6,237.25
List Price:  ISK kr8,732.65
You save:  ISK kr2,495.40
DH457.60
List Price:  DH640.68
You save:  DH183.07
L858.86
List Price:  L1,202.48
You save:  L343.61
ден2,680.59
List Price:  ден3,753.05
You save:  ден1,072.45
MOP$405.37
List Price:  MOP$567.56
You save:  MOP$162.18
N$905.22
List Price:  N$1,267.39
You save:  N$362.16
C$1,845.05
List Price:  C$2,583.22
You save:  C$738.16
रु6,944.60
List Price:  रु9,723
You save:  रु2,778.39
S/180.04
List Price:  S/252.07
You save:  S/72.03
K209.60
List Price:  K293.46
You save:  K83.85
SAR187.56
List Price:  SAR262.60
You save:  SAR75.04
ZK1,159.46
List Price:  ZK1,623.33
You save:  ZK463.87
L219.99
List Price:  L308.01
You save:  L88.01
Kč1,084.23
List Price:  Kč1,518.01
You save:  Kč433.78
Ft17,616.44
List Price:  Ft24,664.42
You save:  Ft7,047.98
SEK kr486.82
List Price:  SEK kr681.60
You save:  SEK kr194.77
ARS$58,213.60
List Price:  ARS$81,503.71
You save:  ARS$23,290.10
Bs346.43
List Price:  Bs485.03
You save:  Bs138.60
COP$205,253.52
List Price:  COP$287,371.35
You save:  COP$82,117.83
₡25,311.50
List Price:  ₡35,438.13
You save:  ₡10,126.62
L1,309.42
List Price:  L1,833.30
You save:  L523.87
₲400,176.72
List Price:  ₲560,279.44
You save:  ₲160,102.71
$U2,044.05
List Price:  $U2,861.83
You save:  $U817.78
zł186.48
List Price:  zł261.09
You save:  zł74.60
Already have an account? Log In

Transcript

Hi, now we will see how to create test cases for create users APA. Right click new test case create users uses our test case is created. We can see both manual and script method here. In manual method, we are going to add a web service keyword send request and we are parsing the object. Here we are parsing create new user object and I am selecting ok and clicking this OK button. I am going to script mode here I am assigning or defining on variable def space create you as our create user SQL two and I am saving it and am adding this very fe status response score in the script in next line and I am passing this create user object in this method and then verifying its status reporting Score is 200 are not actually the AP REST request has will return the status code us to not one.

So, if it returns to not one, our test case is passed. So, here I am giving their their status request response code is 200 or not two not one or not I am verifying that I'm saving it and I am going to manual mode and I see like verify response status score manual method is also created with create user under to not one input and I am running it you can either run by from script mode or manual. Let me run here and our test case is launching begins to run. Let us wait for a few seconds to see there is Yeah, it started raining here you can see and in a very fade it status response code is two not one. Let us fail this test case. Let me tell the core verify whether it has status code is 200 or not and I am passing or running the script.

Now, our test case should fail because the actual response score will be two, not one We are asking the Corps to verify whether it is 200 or not. No, it will verify and it will throw a failed message. It is running. Yeah. In the Send request, you can see it is paused in very free status score. You can see like, it is failed in the error message you can see status code is 200 expected status code is here you can see like expected status code is 200 but actual status code is 201.

This is how we can verify our test cases.

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.