access this repo : ti-click/laravel-with-colopl-tidb-driver-realworld-example-app.git
click the "Gitpod" button
Wait for all tasks to complete automatically
Create a new Terminal tab
run this script
cd ../
git clone https://github.com/gothinkster/realworld.git
cd realworld/api
APIURL=http://localhost:8080/api ./run-api-tests.sh
output
gitpod /workspace/realworld/api (main) $ APIURL=http://localhost:8080/api ./run-api-tests.sh
+++ dirname ./run-api-tests.sh
++ cd .
++ pwd
+ SCRIPTDIR=/workspace/realworld/api
+ APIURL=http://localhost:8080/api
++ date +%s
+ USERNAME=u1666492400
+ EMAIL=u1666492400@mail.com
+ PASSWORD=password
+ npx newman run /workspace/realworld/api/Conduit.postman_collection.json --delay-request 500 --global-var APIURL=http://localhost:8080/api --global-var USERNAME=u1666492400 --global-var EMAIL=u1666492400@mail.com --global-var PASSWORD=password
Need to install the following packages:
newman@5.3.2
Ok to proceed? (y) y
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
newman
Conduit
❏ Auth
↳ Register
POST http://localhost:8080/api/users [200 OK, 749B, 120ms]
✓ Response contains "user" property
✓ User has "email" property
✓ User has "username" property
1. User has "bio" property
2. User has "image" property
✓ User has "token" property
↳ Login
POST http://localhost:8080/api/users/login [200 OK, 769B, 71ms]
✓ Response contains "user" property
✓ User has "email" property
✓ User has "username" property
✓ User has "bio" property
3. User has "image" property
✓ User has "token" property
↳ Login and Remember Token
POST http://localhost:8080/api/users/login [200 OK, 769B, 71ms]
✓ Response contains "user" property
✓ User has "email" property
✓ User has "username" property
✓ User has "bio" property
4. User has "image" property
✓ User has "token" property
✓ Global variable "token" has been set
↳ Current User
GET http://localhost:8080/api/user [200 OK, 769B, 19ms]
✓ Response contains "user" property
✓ User has "email" property
✓ User has "username" property
✓ User has "bio" property
5. User has "image" property
✓ User has "token" property
↳ Update User
PUT http://localhost:8080/api/user [422 Unprocessable Entity, 455B, 20ms]
6. Response contains "user" property
7. User has "email" property
8. User has "username" property
9. User has "bio" property
10. User has "image" property
11. User has "token" property
❏ Articles
↳ All Articles
GET http://localhost:8080/api/articles [200 OK, 27.06kB, 35ms]
✓ Response code is 200 OK
✓ Response contains "articles" property
✓ Response contains "articlesCount" property
✓ articlesCount is an integer
✓ Article has "title" property
✓ Article has "slug" property
✓ Article has "body" property
✓ Article has "createdAt" property
✓ Article's "createdAt" property is an ISO 8601 timestamp
✓ Article has "updatedAt" property
✓ Article's "updatedAt" property is an ISO 8601 timestamp
✓ Article has "description" property
✓ Article has "tagList" property
✓ Article's "tagList" property is an Array
✓ Article has "author" property
✓ Article has "favorited" property
✓ Article has "favoritesCount" property
✓ favoritesCount is an integer
↳ Articles by Author
GET http://localhost:8080/api/articles?author=johnjacob [200 OK, 362B, 17ms]
✓ Response code is 200 OK
✓ Response contains "articles" property
✓ Response contains "articlesCount" property
✓ articlesCount is an integer
✓ articlesCount is 0 when feed is empty
↳ Articles Favorited by Username
GET http://localhost:8080/api/articles?favorited=u1666492400 [200 OK, 362B, 17ms]
✓ Response code is 200 OK
✓ Response contains "articles" property
✓ Response contains "articlesCount" property
✓ articlesCount is an integer
✓ articlesCount is 0 when feed is empty
↳ Articles by Tag
GET http://localhost:8080/api/articles?tag=dragons [200 OK, 362B, 18ms]
✓ Response code is 200 OK
✓ Response contains "articles" property
✓ Response contains "articlesCount" property
✓ articlesCount is an integer
✓ articlesCount is 0 when feed is empty
❏ Articles, Favorite, Comments
↳ Create Article
POST http://localhost:8080/api/articles [201 Created, 706B, 30ms]
✓ Response contains "article" property
✓ Article has "title" property
✓ Article has "slug" property
✓ Article has "body" property
✓ Article has "createdAt" property
✓ Article's "createdAt" property is an ISO 8601 timestamp
✓ Article has "updatedAt" property
✓ Article's "updatedAt" property is an ISO 8601 timestamp
✓ Article has "description" property
✓ Article has "tagList" property
✓ Article's "tagList" property is an Array
✓ Article has "author" property
✓ Article has "favorited" property
✓ Article has "favoritesCount" property
✓ favoritesCount is an integer
↳ Feed
GET http://localhost:8080/api/articles/feed [200 OK, 27.42kB, 34ms]
✓ Response code is 200 OK
✓ Response contains "articles" property
✓ Response contains "articlesCount" property
✓ articlesCount is an integer
✓ Article has "title" property
✓ Article has "slug" property
✓ Article has "body" property
✓ Article has "createdAt" property
✓ Article's "createdAt" property is an ISO 8601 timestamp
✓ Article has "updatedAt" property
✓ Article's "updatedAt" property is an ISO 8601 timestamp
✓ Article has "description" property
✓ Article has "tagList" property
✓ Article's "tagList" property is an Array
✓ Article has "author" property
✓ Article has "favorited" property
✓ Article has "favoritesCount" property
✓ favoritesCount is an integer
↳ All Articles
GET http://localhost:8080/api/articles [200 OK, 27.42kB, 30ms]
✓ Response code is 200 OK
✓ Response contains "articles" property
✓ Response contains "articlesCount" property
✓ articlesCount is an integer
✓ Article has "title" property
✓ Article has "slug" property
✓ Article has "body" property
✓ Article has "createdAt" property
✓ Article's "createdAt" property is an ISO 8601 timestamp
✓ Article has "updatedAt" property
✓ Article's "updatedAt" property is an ISO 8601 timestamp
✓ Article has "description" property
✓ Article has "tagList" property
✓ Article's "tagList" property is an Array
✓ Article has "author" property
✓ Article has "favorited" property
✓ Article has "favoritesCount" property
✓ favoritesCount is an integer
↳ All Articles with auth
GET http://localhost:8080/api/articles [200 OK, 27.42kB, 33ms]
✓ Response code is 200 OK
✓ Response contains "articles" property
✓ Response contains "articlesCount" property
✓ articlesCount is an integer
✓ Article has "title" property
✓ Article has "slug" property
✓ Article has "body" property
✓ Article has "createdAt" property
✓ Article's "createdAt" property is an ISO 8601 timestamp
✓ Article has "updatedAt" property
✓ Article's "updatedAt" property is an ISO 8601 timestamp
✓ Article has "description" property
✓ Article has "tagList" property
✓ Article's "tagList" property is an Array
✓ Article has "author" property
✓ Article has "favorited" property
✓ Article has "favoritesCount" property
✓ favoritesCount is an integer
↳ Articles by Author
GET http://localhost:8080/api/articles?author=u1666492400 [200 OK, 722B, 26ms]
✓ Response code is 200 OK
✓ Response contains "articles" property
✓ Response contains "articlesCount" property
✓ articlesCount is an integer
✓ Article has "title" property
✓ Article has "slug" property
✓ Article has "body" property
✓ Article has "createdAt" property
✓ Article's "createdAt" property is an ISO 8601 timestamp
✓ Article has "updatedAt" property
✓ Article's "updatedAt" property is an ISO 8601 timestamp
✓ Article has "description" property
✓ Article has "tagList" property
✓ Article's "tagList" property is an Array
✓ Article has "author" property
✓ Article has "favorited" property
✓ Article has "favoritesCount" property
✓ favoritesCount is an integer
↳ Articles by Author with auth
GET http://localhost:8080/api/articles?author=u1666492400 [200 OK, 722B, 25ms]
✓ Response code is 200 OK
✓ Response contains "articles" property
✓ Response contains "articlesCount" property
✓ articlesCount is an integer
✓ Article has "title" property
✓ Article has "slug" property
✓ Article has "body" property
✓ Article has "createdAt" property
✓ Article's "createdAt" property is an ISO 8601 timestamp
✓ Article has "updatedAt" property
✓ Article's "updatedAt" property is an ISO 8601 timestamp
✓ Article has "description" property
✓ Article has "tagList" property
✓ Article's "tagList" property is an Array
✓ Article has "author" property
✓ Article has "favorited" property
✓ Article has "favoritesCount" property
✓ favoritesCount is an integer
↳ Single Article by slug
GET http://localhost:8080/api/articles/how-to-train-your-dragon [200 OK, 701B, 23ms]
✓ Response contains "article" property
✓ Article has "title" property
✓ Article has "slug" property
✓ Article has "body" property
✓ Article has "createdAt" property
✓ Article's "createdAt" property is an ISO 8601 timestamp
✓ Article has "updatedAt" property
✓ Article's "updatedAt" property is an ISO 8601 timestamp
✓ Article has "description" property
✓ Article has "tagList" property
✓ Article's "tagList" property is an Array
✓ Article has "author" property
✓ Article has "favorited" property
✓ Article has "favoritesCount" property
✓ favoritesCount is an integer
↳ Articles by Tag
GET http://localhost:8080/api/articles?tag=dragons [200 OK, 722B, 25ms]
✓ Response code is 200 OK
✓ Response contains "articles" property
✓ Response contains "articlesCount" property
✓ articlesCount is an integer
✓ An article was returned
✓ Article has "title" property
✓ Article has "slug" property
✓ Article has "body" property
✓ Article has "createdAt" property
✓ Article's "createdAt" property is an ISO 8601 timestamp
✓ Article has "updatedAt" property
✓ Article's "updatedAt" property is an ISO 8601 timestamp
✓ Article has "description" property
✓ Article has "tagList" property
✓ Article's "tagList" property is an Array
12. The first tag is dragons
13. The second tag is training
✓ Article has "author" property
✓ Article has "favorited" property
✓ Article has "favoritesCount" property
✓ favoritesCount is an integer
↳ Update Article
PUT http://localhost:8080/api/articles/how-to-train-your-dragon [200 OK, 680B, 27ms]
✓ Response contains "article" property
✓ Article has "title" property
✓ Article has "slug" property
✓ Article has "body" property
✓ Article has "createdAt" property
✓ Article's "createdAt" property is an ISO 8601 timestamp
✓ Article has "updatedAt" property
✓ Article's "updatedAt" property is an ISO 8601 timestamp
✓ Article has "description" property
✓ Article has "tagList" property
✓ Article's "tagList" property is an Array
✓ Article has "author" property
✓ Article has "favorited" property
✓ Article has "favoritesCount" property
✓ favoritesCount is an integer
↳ Favorite Article
POST http://localhost:8080/api/articles/how-to-train-your-dragon/favorite [200 OK, 679B, 24ms]
✓ Response contains "article" property
✓ Article has "title" property
✓ Article has "slug" property
✓ Article has "body" property
✓ Article has "createdAt" property
✓ Article's "createdAt" property is an ISO 8601 timestamp
✓ Article has "updatedAt" property
✓ Article's "updatedAt" property is an ISO 8601 timestamp
✓ Article has "description" property
✓ Article has "tagList" property
✓ Article's "tagList" property is an Array
✓ Article has "author" property
✓ Article has "favorited" property
✓ Article's 'favorited' property is true
✓ Article has "favoritesCount" property
✓ favoritesCount is an integer
14. Article's 'favoritesCount' property is greater than 0
↳ Articles Favorited by Username
GET http://localhost:8080/api/articles?favorited=u1666492400 [200 OK, 700B, 24ms]
✓ Response code is 200 OK
✓ Response contains "articles" property
✓ Response contains "articlesCount" property
✓ articlesCount is an integer
✓ Article has "title" property
✓ Article has "slug" property
✓ Article has "body" property
✓ Article has "createdAt" property
✓ Article's "createdAt" property is an ISO 8601 timestamp
✓ Article has "updatedAt" property
✓ Article's "updatedAt" property is an ISO 8601 timestamp
✓ Article has "description" property
✓ Article has "tagList" property
✓ Article's "tagList" property is an Array
✓ Article has "author" property
✓ Article has "favorited" property
✓ Article has "favoritesCount" property
15. favoritesCount is 1
↳ Articles Favorited by Username with auth
GET http://localhost:8080/api/articles?favorited=u1666492400 [200 OK, 700B, 25ms]
✓ Response code is 200 OK
✓ Response contains "articles" property
✓ Response contains "articlesCount" property
✓ articlesCount is an integer
✓ Article has "title" property
✓ Article has "slug" property
✓ Article has "body" property
✓ Article has "createdAt" property
✓ Article's "createdAt" property is an ISO 8601 timestamp
✓ Article has "updatedAt" property
✓ Article's "updatedAt" property is an ISO 8601 timestamp
✓ Article has "description" property
✓ Article has "tagList" property
✓ Article's "tagList" property is an Array
✓ Article has "author" property
✓ Article has "favorited" property
✓ Article has "favoritesCount" property
16. favoritesCount is 1
↳ Unfavorite Article
DELETE http://localhost:8080/api/articles/how-to-train-your-dragon/favorite [200 OK, 680B, 28ms]
✓ Response contains "article" property
✓ Article has "title" property
✓ Article has "slug" property
✓ Article has "body" property
✓ Article has "createdAt" property
✓ Article's "createdAt" property is an ISO 8601 timestamp
✓ Article has "updatedAt" property
✓ Article's "updatedAt" property is an ISO 8601 timestamp
✓ Article has "description" property
✓ Article has "tagList" property
✓ Article's "tagList" property is an Array
✓ Article has "author" property
✓ Article has "favorited" property
✓ Article has "favoritesCount" property
✓ favoritesCount is an integer
✓ Article's "favorited" property is false
↳ Create Comment for Article
POST http://localhost:8080/api/articles/how-to-train-your-dragon/comments [201 Created, 562B, 24ms]
✓ Response contains "comment" property
✓ Comment has "id" property
✓ Comment has "body" property
✓ Comment has "createdAt" property
✓ "createdAt" property is an ISO 8601 timestamp
✓ Comment has "updatedAt" property
✓ "updatedAt" property is an ISO 8601 timestamp
✓ Comment has "author" property
↳ All Comments for Article
GET http://localhost:8080/api/articles/how-to-train-your-dragon/comments [200 OK, 560B, 24ms]
✓ Response code is 200 OK
✓ Response contains "comments" property
✓ Comment has "id" property
✓ Comment has "body" property
✓ Comment has "createdAt" property
✓ "createdAt" property is an ISO 8601 timestamp
✓ Comment has "updatedAt" property
✓ "updatedAt" property is an ISO 8601 timestamp
✓ Comment has "author" property
↳ All Comments for Article without login
GET http://localhost:8080/api/articles/how-to-train-your-dragon/comments [200 OK, 560B, 20ms]
✓ Response code is 200 OK
✓ Response contains "comments" property
✓ Comment has "id" property
✓ Comment has "body" property
✓ Comment has "createdAt" property
✓ "createdAt" property is an ISO 8601 timestamp
✓ Comment has "updatedAt" property
✓ "updatedAt" property is an ISO 8601 timestamp
✓ Comment has "author" property
↳ Delete Comment for Article
DELETE http://localhost:8080/api/articles/how-to-train-your-dragon/comments/6052837899185947000 [404 Not Found, 12.3kB, 19ms]
↳ Delete Article
DELETE http://localhost:8080/api/articles/how-to-train-your-dragon [200 OK, 328B, 22ms]
❏ Profiles
↳ Register Celeb
POST http://localhost:8080/api/users [200 OK, 761B, 73ms]
✓ Response contains "user" property
✓ User has "email" property
✓ User has "username" property
17. User has "bio" property
18. User has "image" property
✓ User has "token" property
↳ Profile
GET http://localhost:8080/api/profiles/celeb_u1666492400 [200 OK, 415B, 19ms]
✓ Response code is 200 OK
✓ Response contains "profile" property
✓ Profile has "username" property
✓ Profile has "bio" property
✓ Profile has "image" property
✓ Profile has "following" property
↳ Follow Profile
POST http://localhost:8080/api/profiles/celeb_u1666492400/follow [200 OK, 414B, 18ms]
✓ Response code is 200 OK
✓ Response contains "profile" property
✓ Profile has "username" property
✓ Profile has "bio" property
✓ Profile has "image" property
✓ Profile has "following" property
✓ Profile's "following" property is true
↳ Unfollow Profile
DELETE http://localhost:8080/api/profiles/celeb_u1666492400/follow [200 OK, 415B, 22ms]
✓ Response code is 200 OK
✓ Response contains "profile" property
✓ Profile has "username" property
✓ Profile has "bio" property
✓ Profile has "image" property
✓ Profile has "following" property
✓ Profile's "following" property is false
❏ Tags
↳ All Tags
GET http://localhost:8080/api/tags [200 OK, 620B, 16ms]
✓ Response code is 200 OK
✓ Response contains "tags" property
✓ "tags" property returned as array
┌─────────────────────────┬───────────────────┬───────────────────┐
│ │ executed │ failed │
├─────────────────────────┼───────────────────┼───────────────────┤
│ iterations │ 1 │ 0 │
├─────────────────────────┼───────────────────┼───────────────────┤
│ requests │ 32 │ 0 │
├─────────────────────────┼───────────────────┼───────────────────┤
│ test-scripts │ 48 │ 0 │
├─────────────────────────┼───────────────────┼───────────────────┤
│ prerequest-scripts │ 18 │ 0 │
├─────────────────────────┼───────────────────┼───────────────────┤
│ assertions │ 344 │ 18 │
├─────────────────────────┴───────────────────┴───────────────────┤
│ total run duration: 17.7s │
├─────────────────────────────────────────────────────────────────┤
│ total data received: 127.29kB (approx) │
├─────────────────────────────────────────────────────────────────┤
│ average response time: 31ms [min: 16ms, max: 120ms, s.d.: 21ms] │
└─────────────────────────────────────────────────────────────────┘
# failure detail
01. AssertionError User has "bio" property
expected false to be truthy
at assertion:3 in test-script
inside "Auth / Register"
02. AssertionError User has "image" property
expected false to be truthy
at assertion:4 in test-script
inside "Auth / Register"
03. AssertionError User has "image" property
expected false to be truthy
at assertion:4 in test-script
inside "Auth / Login"
04. AssertionError User has "image" property
expected false to be truthy
at assertion:4 in test-script
inside "Auth / Login and Remember Token"
05. AssertionError User has "image" property
expected false to be truthy
at assertion:4 in test-script
inside "Auth / Current User"
06. AssertionError Response contains "user" property
expected false to be truthy
at assertion:0 in test-script
inside "Auth / Update User"
07. AssertionError User has "email" property
expected false to be truthy
at assertion:1 in test-script
inside "Auth / Update User"
08. AssertionError User has "username" property
expected false to be truthy
at assertion:2 in test-script
inside "Auth / Update User"
09. AssertionError User has "bio" property
expected false to be truthy
at assertion:3 in test-script
inside "Auth / Update User"
10. AssertionError User has "image" property
expected false to be truthy
at assertion:4 in test-script
inside "Auth / Update User"
11. AssertionError User has "token" property
expected false to be truthy
at assertion:5 in test-script
inside "Auth / Update User"
12. AssertionError The first tag is dragons
expected false to be truthy
at assertion:15 in test-script
inside "Articles, Favorite, Comments / Articles by Tag"
13. AssertionError The second tag is training
expected false to be truthy
at assertion:16 in test-script
inside "Articles, Favorite, Comments / Articles by Tag"
14. AssertionError Article's 'favoritesCount' property is greater than 0
expected false to be truthy
at assertion:16 in test-script
inside "Articles, Favorite, Comments / Favorite Article"
15. AssertionError favoritesCount is 1
expected false to be truthy
at assertion:17 in test-script
inside "Articles, Favorite, Comments / Articles Favorited by Username"
16. AssertionError favoritesCount is 1
expected false to be truthy
at assertion:17 in test-script
inside "Articles, Favorite, Comments / Articles Favorited by Username with auth"
17. AssertionError User has "bio" property
expected false to be truthy
at assertion:3 in test-script
inside "Profiles / Register Celeb"
18. AssertionError User has "image" property
expected false to be truthy
at assertion:4 in test-script
inside "Profiles / Register Celeb"
install the gitpod chrome extension
access this repo : ti-click/laravel-with-colopl-tidb-driver-realworld-example-app.git
click the "Gitpod" button
Wait for all tasks to complete automatically
Create a new Terminal tab
run this script
output