Test scenarios - HunYahiko/smart-parking-system GitHub Wiki

Test Scenarios.

Scenario 1. As a user, I want to log in the system from the first activity of the mobile application. Actor provides wrong credentials.

  1. Actor provides invalid credentials to the system.
  2. The system validates input credentials.
  3. The system presents an exception about invalid credentials.

Scenario 2. As a user, I want to log in the system from the first activity of the mobile application. Actor provides correct credentials.

  1. Actor provides valid credentials to the system.
  2. The system validates input credentials.
  3. The system generates a token for freshly logged-in user.
  4. The system presents new token to actor.

Scenario 3. As a user, I want to register in the system from the first activity of the mobile application. Actor provides username which is already taken.

  1. Actor provides information for registration with already taken username to the system.
  2. The system checks if user with given username exists.
  3. The system presents an exception about taken username.

Scenario 4. As a user, I want to register in the system from the first activity of the mobile application. Actor provides taken phone number.

  1. Actor provides information for registration with already taken phone number.
  2. The system checks if user with given username exists.
  3. The system checks if user with given phone number exists.
  4. The system presents an exception about taken phone number.

Scenario 5. As a user, I want to register in the system from the first activity of the mobile application. Actor provides valid information.

  1. Actor provides information for registration.
  2. The system checks if user with given username exists.
  3. The system checks if user with given phone number exists.
  4. The system encrypts the password of new user.
  5. The system saves new user in the database.
  6. The system presents actor with a successful response.

Scenario 6. As a user, I want to book a parking lot in a selected parking. Actor request a parking lot in selected parking but it does not exists.

  1. Actor creates a request for a parking lot, providing information about selected parking.
  2. The system validates parking for existence based on provided information.
  3. The system presents an exception about non-existing parking based on provided information.

Scenario 7. As a user, I want to book a parking lot in a selected parking. Actor request a parking lot in selected parking but no parking lot is free.

  1. Actor creates a request for a parking lot, providing information about selected parking.
  2. The system validates parking for existence based on provided information.
  3. The system searches for a free parking lot in requested parking.
  4. The system founds none.
  5. The system presents an exception about no free parking lots.

Scenario 8. As a user, I want to book a parking lot in a selected parking. Actor requests a parking lot in selected parking and a book request is created.

  1. Actor creates a request for a parking lot, providing information about selected parking.
  2. The system validates parking for existence based on provided information.
  3. The system searches for a free parking lot in requested parking.
  4. The system finds a free parking lot.
  5. The system sends a block message to physical parking lot.
  6. The system creates a new book request with found parking lot and current user.
  7. The system saves book request in the database.
  8. The system presents to actor a successful creation response.