Skip to content

Testing

Testing

1. Authentication

1.1 Register

  • Test Case:

    • Perform registration with valid information.
    • Verify successful registration and account creation.
  • Expected Result:

    • User account is successfully registered.

1.2 Login

  • Test Case:

    • Log in with valid credentials.
    • Verify successful login.
  • Expected Result:

    • User is successfully logged into the system.

2. User Management

2.1 Add New User

  • Test Case:

    • Admin adds a new user with valid information.
    • Verify new user creation.
  • Expected Result:

    • New user is successfully added to the system.

2.2 Login as a New User

  • Test Case:

    • Log in with the credentials of the newly added user.
    • Verify successful login.
  • Expected Result:

    • New user is able to log in without issues.

2.3 Remove User

  • Test Case:

    • Admin removes an existing user.
    • Verify user removal.
  • Expected Result:

    • User is successfully removed from the system.

2.4 Authorization Check

  • Test Case:

    • Attempt to add a new user with a non-admin role (e.g., pharmacist).
    • Verify that non-admin roles cannot add new users.
  • Expected Result:

    • Non-admin roles are restricted from adding new users.

3. Order Management

3.1 Add New Order

  • Test Case:

    • Create a new order with valid details.
    • Verify successful order creation.
  • Expected Result:

    • New order is successfully created.

3.2 View the New Order

  • Test Case:

    • Navigate to the order list and view the newly created order.
    • Verify correct display of order details.
  • Expected Result:

    • Order details are correctly displayed.

3.3 Edit the Order (Before Accepting Offers)

  • Test Case:

    • Modify the order details before any offers are submitted.
    • Verify that changes are saved successfully.
  • Expected Result:

    • Order is successfully edited before offers are submitted.

4. Offer Management

4.1 View the Order (Checking Privilege)

  • Test Case:

    • Attempt to view an order as a user without the required privilege.
    • Verify restricted access.
  • Expected Result:

    • Users without the necessary privilege cannot view the order.

4.2 Add an Offer

4.2.1 Include Attachment

  • Test Case:

    • Submit an offer with an attachment.
    • Verify successful attachment inclusion.
  • Expected Result:

    • Offer is successfully submitted with the attached file.

4.2.2 Price Calculation

  • Test Case:

    • Submit an offer with a calculated price.
    • Verify correct price calculation.
  • Expected Result:

    • Offer displays the accurate calculated price.

4.3 View an Offer from the Orderer Side

  • Test Case:

    • Log in as the orderer and view the received offers.
    • Verify correct display of offer details.
  • Expected Result:

    • Offer details are correctly displayed from the orderer’s perspective.

4.4 Accept an Offer

4.4.1 All Other Offers Should Be Rejected

  • Test Case:
    • Accept one offer and verify that all other offers are automatically rejected.
  • Expected Result:
    • Only the accepted offer remains; all others are rejected.

4.4.2 Information Exchange

  • Test Case:
    • Verify that relevant information is exchanged upon accepting an offer.
  • Expected Result:
    • Necessary information is correctly shared between parties.

5. Commission Calculation

5.1 Admins Should Not Receive Bonus

  • Test Case:

    • Conduct successful transactions with an admin account.
    • Verify that admins do not receive a bonus.
  • Expected Result:

    • Admins do not receive a bonus for successful transactions.

5.2 Pharmacists Should Receive for ONLY Successful Transactions

  • Test Case:

    • Conduct successful and unsuccessful transactions with a pharmacist account.
    • Verify that pharmacists receive a bonus only for successful transactions.
  • Expected Result:

    • Pharmacists receive a bonus only for successful transactions.

6. BOA (Bank Of Abyssinia) Integration

  • Note:
    • BOA integration will be introduced in the next major version (V2.0.0) of LinkPharm.
    • Specific test cases related to BOA integration will be added in the next testing cycle.

Note: Ensure that each test case is documented with clear steps, expected results, and any specific conditions or considerations. Regularly update and expand this testing documentation as new features are introduced or existing features are modified.

Testing Considerations for Version Updates

  • Versioning:

    • LinkPharm uses semantic versioning.
    • Any major version update (e.g., V2.0.0) requires full testing (manual and minor).
    • Minor updates (e.g., V1.1.0) require selected tests.
    • Patch updates (e.g., V1.0.1) require unit testing only.
  • Test Planning:

    • Before major version updates, plan comprehensive testing strategies covering all functionalities.
    • For minor updates, focus on testing areas directly affected by the changes.
    • Patch updates primarily involve unit testing of specific components.
  • Regression Testing:

    • After each update, conduct regression testing to ensure existing functionalities remain unaffected.