Home RoadMap Blog Contact us Learn

BMI Calculator

The BMI Calculator is a web application designed to compute and display the Body Mass Index (BMI) based on user inputs.

BMI Calculator

BMI Calculator

Feature: BMI Calculator

@happy-path
Scenario 1: Successful BMI Calculation
Given: The user opens the BMI Calculator.
When: The user inputs valid height, weight, selects gender, and age.
Then: The user clicks on the Calculate BMI button.
And: The system displays the correct BMI value with the category.

@error-case
Scenario 2: Missing Height
Given: The user opens the BMI Calculator.
When: The user leaves the height fields empty.
And: The user inputs valid weight, selects gender, and age.
Then: The user clicks on the Calculate BMI button.
And: The system displays an error message, "Please enter a valid height."

@error-case
Scenario 3: Invalid Height Value
Given: The user opens the BMI Calculator.
When: The user inputs a height value less than 1 foot or more than 8 feet, or inches not in the range of 0 to 11.
And: The user inputs valid weight, selects gender, and age.
Then: The user clicks on the Calculate BMI button.
And: The system displays an error message, "Please enter a valid height."

@error-case
Scenario 4: Missing Weight
Given: The user opens the BMI Calculator.
When: The user leaves the weight field empty.
And: The user inputs valid height, selects gender, and age.
Then: The user clicks on the Calculate BMI button.
And: The system displays an error message, "Please enter a valid weight between 20 kg and 300 kg."

@error-case
Scenario 5: Invalid Weight Value
Given: The user opens the BMI Calculator.
When: The user inputs a weight less than 20 kg or more than 300 kg.
And: The user inputs valid height, selects gender, and age.
Then: The user clicks on the Calculate BMI button.
And: The system displays an error message, "Please enter a valid weight between 20 kg and 300 kg."

@error-case
Scenario 6: Missing Gender
Given: The user opens the BMI Calculator.
When: The user does not select a gender.
And: The user inputs valid height, weight, and age.
Then: The user clicks on the Calculate BMI button.
And: The system displays an error message, "Please select your gender."

@error-case
Scenario 7: Missing Age
Given: The user opens the BMI Calculator.
When: The user leaves the age field empty.
And: The user inputs valid height, weight, and selects gender.
Then: The user clicks on the Calculate BMI button.
And: The system displays an error message, "Please enter a valid age between 5 and 120 years."

@error-case
Scenario 8: Invalid Age Value
Given: The user opens the BMI Calculator.
When: The user inputs an age less than 5 years or more than 120 years.
And: The user inputs valid height, weight, and selects gender.
Then: The user clicks on the Calculate BMI button.
And: The system displays an error message, "Please enter a valid age between 5 and 120 years."

@happy-path
Scenario 9: Resetting the Form
Given: The user opens the BMI Calculator.
When: The user fills in all the fields with valid data.
Then: The user clicks on the Reset button.
And: All the input fields are cleared and reset to their default state.

Recent Posts