Serenity and Cucumber Quick Start
Home > Api > Registering a new user > Username must be unique
Report generated 12-03-2024 07:14

Registering A New User

  Integration   Under 1 Second (Duration)

Username must be unique
Steps Outcome
POST http://localhost:38083/wordle/api/auth/register

Response

URL: http://localhost:38083/wordle/api/auth/register

Status code: 201

Content Type: application/json

Request Headers

Accept=*/*
Content-Type=application/json

Content Body

{
"id": null,
"username": "a1fses64@gmail.com",
"password": "secret",
"email": "margarita.auer",
"role": "ROLE_PLAYER",
"country": "GB",
"receiveUpdates": false
}

Response Headers

Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-Content-Type-Options: nosniff
X-XSS-Protection: 0
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Type: text/plain;charset=UTF-8
Content-Length: 18
Date: Tue, 12 Mar 2024 07:14:29 GMT
Keep-Alive: timeout=60
Connection: keep-alive

Response Body

a1fses64@gmail.com
SUCCESS 001ms
POST http://localhost:38083/wordle/api/auth/register

Response

URL: http://localhost:38083/wordle/api/auth/register

Status code: 409

Content Type: application/json

Request Headers

Accept=*/*
Content-Type=application/json

Content Body

{
"id": null,
"username": "a2fses64@gmail.com",
"password": "secret",
"email": "margarita.auer",
"role": "ROLE_PLAYER",
"country": "GB",
"receiveUpdates": false
}

Response Headers

Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-Content-Type-Options: nosniff
X-XSS-Protection: 0
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Type: text/plain;charset=UTF-8
Content-Length: 39
Date: Tue, 12 Mar 2024 07:14:29 GMT
Keep-Alive: timeout=60
Connection: keep-alive

Response Body

A player with this email already exists
SUCCESS 002ms
SUCCESS 0.14s
Serenity BDD version 4.1.3