20 slightly harder, more SDET-oriented if-else test scenarios
Here’s a second list with 20 slightly harder, more SDET-oriented if-else test scenarios (still no solutions). These lean towards practical testing logic and edge-case validation:
-
Check if an email address contains both '@' and '.' in valid positions.
-
Validate if a mobile number has exactly 10 digits.
-
Check if a given string is a palindrome (basic version, case-sensitive).
-
Verify if a password contains at least one uppercase letter and one digit.
-
Check if a date (day, month) forms a valid calendar date (ignore year).
-
Validate if two given strings are anagrams (basic version).
-
Check if a username length is between 6 and 15 characters.
-
Check if a given file extension is allowed (e.g., .jpg, .png, .pdf).
-
Verify if an age input is numeric and within 0-120.
-
Check if a time (HH:MM) is in valid 24-hour format.
-
Check if a string contains only alphabetic characters.
-
Validate if a credit card number has exactly 16 digits.
-
Check if a list of numbers is sorted in ascending order.
-
Check if a string input is not null and not empty (both).
-
Verify if the entered country code starts with '+' and has 2-3 digits.
-
Check if a given amount is a valid positive decimal number.
-
Validate if a string ends with ".com" or ".org" domain.
-
Check if a number is within multiple ranges (e.g., 10-20 or 30-40).
-
Verify if a string does not contain any white spaces.
-
Check if a user-entered promo code is valid based on allowed codes.
This set simulates the kind of validation and input-checking logic you’ll often write or test in SDET work — web forms, APIs, and UI field validation.
Comments
Post a Comment