-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
373 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,81 @@ | ||
Fitur: API REQRES.IN | ||
Fitur: DummyJSON API | ||
|
||
Skenario: Menampilkan daftar user pada API REQRES.IN | ||
Dengan Saya melakukan metode "GET" request pada "https://reqres.in/api/users" | ||
Otomasi API dengan DummyJSON API | ||
|
||
Skenario: Login pengguna menggunakan Kredensial yang Sah | ||
Ketika Saya melakukan metode "POST" request pada "https://dummyjson.com/auth/login" | ||
Dan Saya set data untuk body menggunakan | ||
""" | ||
{ | ||
"username": "emilys", | ||
"password": "emilyspass" | ||
} | ||
""" | ||
Ketika Saya menerima sebuah response API | ||
Maka Saya mengharapkan status code response API nya "200" | ||
Dan Saya mengharapkan response API nya berisi json | ||
""" | ||
{ | ||
"id": 1, | ||
"email": "[email protected]", | ||
"username": "emilys", | ||
"firstName": "Emily", | ||
"lastName": "Johnson", | ||
"gender": "female" | ||
} | ||
""" | ||
|
||
Skenario: Login pengguna menggunakan Kredensial Tidak Sah | ||
Ketika Saya melakukan metode "POST" request pada "https://dummyjson.com/auth/login" | ||
Dan Saya set data untuk body menggunakan | ||
""" | ||
{ | ||
"username": "notfounduser", | ||
"password": "invalidpassword" | ||
} | ||
""" | ||
Ketika Saya menerima sebuah response API | ||
Maka Saya mengharapkan status code response API nya "400" | ||
Dan Saya mengharapkan response API nya berisi json | ||
""" | ||
{ | ||
"message": "Invalid credentials" | ||
} | ||
""" | ||
|
||
Skenario: Tambah Pengguna Baru menggunakan Data yang Sah | ||
Ketika Saya melakukan metode "POST" request pada "https://dummyjson.com/users/add" | ||
Dan Saya set data untuk body menggunakan | ||
""" | ||
{ | ||
"firstName": "Ujang", | ||
"lastName": "Tea", | ||
"maidenName": "Jajang", | ||
"age": 17, | ||
"gender": "male", | ||
"email": "[email protected]", | ||
"phone": "+62 812-1234-1234", | ||
"username": "ujangjajang", | ||
"password": "123123123" | ||
} | ||
""" | ||
Ketika Saya menerima sebuah response API | ||
Maka Saya mengharapkan status code response API nya "201" | ||
Dan Saya mencatat isi response body nya | ||
|
||
Skenario: Mendapatkan Data Pengguna Tunggal yang Sah | ||
Ketika Saya melakukan metode "GET" request pada "https://dummyjson.com/users/1" | ||
Ketika Saya menerima sebuah response API | ||
Maka Saya mengharapkan status code response API nya "200" | ||
Dan Saya mencatat isi response body nya | ||
|
||
Skenario: Mendapatkan Data Pengguna Tunggal yang Tidak Sah | ||
Ketika Saya melakukan metode "GET" request pada "https://dummyjson.com/users/99999" | ||
Ketika Saya menerima sebuah response API | ||
Maka Saya mengharapkan status code response API nya "200" | ||
Maka Saya mengharapkan status code response API nya "404" | ||
Dan Saya mengharapkan response API nya berisi json | ||
""" | ||
{ | ||
"message": "User with id '99999' not found" | ||
} | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.