Test cases for Mandatory Fields

A Page/Form has 4 Mandatory fields to be entered before you Submit.

How many no. of test cases are required to verify this?And What are they?

Questions by Valusa79   answers by Valusa79

Showing Answers 1 - 16 of 16 Answers

Well, in this case we can have the following scenarios

Five test cases:
1. Enter the data in all the mandatory fields and summit, shouldnt issue any error message
2. Enter data in any two mandatory fields and summit, should issue an error message
3. Dont enter in any of the fields should issue an error message
4. If the fields accept only number, enter  numbers in the fields and submit, should not issue an error message, try to enter only in two fields should issue an error message, and enter alphabets in two fields and number in other two fields it should issue an error meaage
5. If the fields doesnt accept special characters, then enter the charatcers and submit it.

  Was this answer useful?  Yes

Hi

 In this scenario we can write the cases for below scenarios.

a. First of submit the page with empty values and observe whether the page 
    throughs the validation messages or not

b. Each time leave any one of the mandatory field, fill remaining fields with valid data, submit the form and verify page should throughs the val messages for left field.

c. Each time leave any two of the mandatory field, fill remaining fields with valid data, submit the form and verify page should throughs the val messages for left fields.

d. Each time leave any 3 of the mandatory field, fill remaining field with valid data, submit the form and verify page should throughs the val messages for left field.

These can be tested in the diff scenarios , scenarios will come by experience.

If the accessable data type is given we can go for data validation test cases


Srinivas

1. Empty 4 fields, clicked Submit button and check for the Alert message.
2. Each time leave one field as empty and clicked submit button and check for the Alert message.
3. Each time leave two field as empty and clicked submit button and check for the Alert message.
4. Each time leave three field as empty and clicked submit button and check for the Alert message.
5. Enter the invalid entries (special
characters, Alpha-numeric's) for each fields as combination of entries and verify the alert messages.
6. Positive, enter the valid entries in all 4 fields and clicked Submit button.

  Was this answer useful?  Yes

sr.test.eng

  • Sep 27th, 2009
 

It depends on what kind of fileds are these and howdiffeent form each other.
If all are different form each other,
we need at least 24 test cases in terms of permutation logic.
In addtion if its a web page we have to include dirty bit test cases.
If fields are numeric or non numeric we have to add those test cases.

  Was this answer useful?  Yes

An application has 4 mandatory fields before submitting.  How many test cases are required to fully test these mandatory fields and what are the test cases?


Notes:
1) Determine from requirements and specifications whether the fields are text boxes or selectable menu items. If text boxes, then determine what constitutes valid and invalid data for each of them. Do they accept alphanumeric characters, numbers only, special characters?  Depending on the answer, additional validation test cases will be necessary. 
2) In this exercise, I will assume the fields are selectable menu items that do not require further validation (ex: textual format or special characters). Nor will they require boundary value analysis.
3) As long as the mandatory fields have no logical relationship or interaction with one another, it is not necessary to test all permutations of this functionality.  Unless you are automating these tests, doing so would be a waste of time and resources. 
4) In each test, verify that the appropriate validation messages appear and that each validation message is proper.
5) The 4 mandatory fields are labeled MF1, MF2, MF3, and MF4.  


MANUAL TESTS
TC1: Attempt to submit form with all mandatory fields empty
TC2: Submit form with valid data in all fields
TC3: Attempt to submit form with valid data in fields except leave MF1 empty
TC4: Attempt to submit form with valid data in fields except leave MF2 empty
TC5: Attempt to submit form with valid data in fields except leave MF3 empty
TC6: Attempt to submit form with valid data in fields except leave MF4 empty
TC7: Attempt to submit with valid data except leave MF1 and MF2 empty
TC8: Attempt to submit with valid data except leave MF2, MF3, and MF4 empty


AUTOMATED TESTS
TC1: Attempt to submit form with all mandatory fields empty
TC2: Submit form with valid data in all fields
TC3: Attempt to submit form with valid data in fields except leave MF1 empty
TC4: Attempt to submit form with valid data in fields except leave MF2 empty
TC5: Attempt to submit form with valid data in fields except leave MF3 empty
TC6: Attempt to submit form with valid data in fields except leave MF4 empty
TC7: Attempt to submit form with valid data in fields except leave MF1 and MF2 empty
TC8: Attempt to submit form with valid data in fields except leave MF2 and MF3 empty
TC9: Attempt to submit form with valid data in fields except leave MF3 and MF4 empty
TC10: Attempt to submit with valid data in fields except leave MF1 and MF3 empty
TC11: Attempt to submit with valid data in fields except leave MF1 and MF4 empty
TC12: Attempt to submit with valid data in fields except leave MF2 and MF4 empty
TC13: Attempt to submit with valid data except leave MF1, MF2, and MF3 empty
TC14: Attempt to submit with valid data except leave MF1, MF3, and MF4 empty
TC15: Attempt to submit with valid data except leave MF1, MF2, and MF4 empty
TC16: Attempt to submit with valid data except leave MF2, MF3, and MF4 empty

kk01041883

  • Jan 16th, 2010
 

Mandatory validation can be covered for the four fields in a single test case by writing the below test scenarios as test steps.

1. Leave all the fields Empty click on Finish.

2. Enter the first mandatory field and leave the rest of the mandatory fields as Blank then click finish.

3. Enter the Second mandatory field and leave the rest of the mandatory fields as Blank then click finish.

4. Enter the third mandatory field and leave the rest of the mandatory fields as Blank then click finish.

5. Enter the Fifth mandatory field and leave the rest of the mandatory fields as Blank then click finish.

6. Enter the First and second mandatory fields then leave the rest of the mandatory fields as Blank then click finish.

Like this we can develop test steps under single test case.

The best practice is write single test cases and cover the above said scenarios as test steps so that the coverage will be good with minimal number of test cases rather than writing as single test cases.

Get back to me for any clarifications

  Was this answer useful?  Yes

Along with all these tests we also have to test for the next tab. After entering first field and when we press tab to go to next field exactly where it taking the control.

  Was this answer useful?  Yes

Assume the four fields are present in the application those are

user name
password
phone number
mail id

In this Password and Mail id both are required fields o complete the registration
1.
Press submit button without entering any data in all fields
2. Enter some data in Password field and click on submit button
3. And some data in mail id field and click on submit button the mail id field
must show the error message
4. Try to enter the invalid data in User name and phone number field. It must throw the proper validation message
5. Try to enter the invalid
characters of the Mail id field


  Was this answer useful?  Yes

sara

  • Jan 27th, 2016
 

If field are user name, email Id, subject and your comment then what are test cases?

  Was this answer useful?  Yes

Prashanth

  • May 24th, 2016
 

One test case is enough. Name all the 4 mandatory fields in testcase steps (Enter the mandatory values 1,2,3 and 4) and Submit the form

  Was this answer useful?  Yes

Rohan

  • May 31st, 2016
 

We have to also check that if we fill three fields and leave 1 blank, will it work or not.

  Was this answer useful?  Yes

keshav singh

  • Aug 24th, 2016
 

it will be 4P4 so 4*3*2*1 = 24 Test case

  Was this answer useful?  Yes

krishna

  • Sep 8th, 2016
 

Sno Column1 Column 2 Column 3 Column 4
1 0 0 0 0
2 0 0 0 1
3 0 0 1 0
4 0 0 1 1
5 0 1 0 0
6 0 1 0 1
7 0 1 1 0
8 0 1 1 1
9 1 0 0 0
10 1 0 0 1
11 1 0 1 0
12 1 0 1 1
13 1 1 0 0
14 1 1 0 1
15 1 1 1 0
16 1 1 1 1

  Was this answer useful?  Yes

priya

  • Dec 12th, 2016
 

How To write Test case for Comfirm password Alert messsage?

  Was this answer useful?  Yes

triveni

  • Jun 14th, 2017
 

What kind of testing is this? Can I know the name? because there are many kind of testing

  Was this answer useful?  Yes

Sagar

  • Jun 14th, 2017
 

Approach is checking with all the 4 mandatory fields and then missing one of the field respectively like give 3 fields and miss one field and giving 2 fields and missing 2 and giving 1 field and missing the other 3 fields.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions