# How to write test cases for the problem that is explained below

In an application, there are three statuses: tourist, traveler, and explorer.

Tourist traveled more than 15 days in a year becomes a traveler. Tourist traveled more than 25 days in a year becomes an explorer. Traveler traveled more than 25 days in a year becomes an explorer.

If the status is tourist, there would be no reduction for the customer. If the status is traveler, there would be a 10% reduction for the customer. If the status is explorer, there would be a 20% reduction on the flight charges.

What would be the test cases for these questions? Please note I am a beginner in software testing.I couldn't find much test cases for this question. It would be helpful if I get the maximum test coverage.

Two immediate things stand out to me here without putting much thought into it

1. Test the boundaries of the day values get the correct discount applied.
2. Test that the year is being calculated correctly. Check that only days traveled during the current year count.

Hopefully this gets you on the right track. Developing an analytical mind is very important in this line of work, so try to use these starting points to explore the application further yourself.

Following are some scenarios you should test:

• The status transitions from Tourist > Traveller > Explorer.

• Discounts should be applied properly based on the type of user.

• When the status transition occurs, the discount should be applied properly

• For tourist that has travelled 14days in a year and making the next travel, the discount should be increased in the next travel only(boundary values of days travelled). Applies for 24days travelled and making the next travel booking as well. (This is dependent on the business requirement).

You can use the below-mentioned use-cases for your problem, that we will usually create for functional testing services in our software testing services company.

Tourist

• Verify the status for person traveled for 14 days in a year
• Verify that there is no discount applied on flight charges for tourist status
• Verify the status change from Tourist to Traveller on traveling more than 15 days in a year
• Verify that after transition 10% discount is applied on flight charges for ‘Traveller’ status
• Verify the status change from Tourist to Explorer on traveling more than 25 days in a year
• Verify that 20% discount is applied on the flight charges after status transition.

Traveller

• Verify the status for person travelled for 24 days in a year
• Verify that 10% discount is applied on flight charges for ‘Traveller’ status
• Verify the status change from Traveller to explorer on traveling more than for 25 days in a year
• Verify that, after the transition to 'Explorer' status, 20% discount is applied on the flight charges.

Explorer

• Verify the status for person travelled more than 25 days in a year
• Verify that 20% discount is applied on flight charges for ‘Explorer’ status