How to writeTest Cases in Gherkin Format [for create a contact, edit contact & delete contact details in the device]

 

----------------------------------------------------------------------------------------------------------------------------------------

Test Cases for create a contact, edit contact & delete contact details in the device

----------------------------------------------------------------------------------------------------------------------------------------

Given I have a working mobile device with fully charged Battery
and a valid SIM card inserted properly in it
and it contains a key pad with buttons and Numbers 0-9,Alphabets,Few Special characters are printed on the buttons
and it contains Call,End,Ok,Up & Down arrow buttons, Power On/Power off button, A button to Increase & decrease Volume and a button to take a picture
and it contains Visual Display Screen, Ear Speaker,Microphone,Vibrator Motor, Default Memory storage unit and a Camera

When I unlock my device with a PIN or a password or with shortcut keys or with a pattern

Then I see the home screen
and the icons on the home screen
and the Provider network signal strength and the Battery consumption Level

When I Press the scroll button and select Create Contacts >Select New Contact

Then I see an option to save the contact whether to the phone memory or the SIM card
and I select the option 'Phone Memory'
and  I see Firth Name, Last Name and Phone Number text fields
and  I select SAVE without entering the name & phone number
and  I see a warning message indicating to a provide Name and Number


When I tap Phone number field
Then only numeric type key pad is displayed and only numeric are allowed to enter
and  I entered an already existing contact Name and phone number

and I top Save
and I see a warning message indicating the details are already exists in the device and I see an alert  to save that number with alternate name

and I saved it with an alternate name


When saving the contact details I got an incoming call/SMS
Then I answered the call or read SMS
and I redirected to the contact screen once after I end the incoming call

and I saved the contact details


When I enter huge name with special chars in the First and Last Name fields and tap Save
Then I see a warning message indicating the Maximum character limit for the Name is exceeded


When Phone memory is full, I Select Save contact on the device
Then I see a warning message indicating that no space left out in the device memory

 

When I select save contact after clearing the space in the device

Then I see a confirmation message indicating that the contact details are saved

and I see the details in the contacts


When I select Save after entering the name & 100 numbers in the phone number field with country code
Then
I see an alert message indicating that the Contact details are saved in the phone memory and the phone field is restricted with 10 digits

When I tap Contacts on the home screen

Then I see + button

and Tap + button to add contact details
and I enter the first, last name, phone number

and I tap save

Then I see a message indicating that the contact details are saved in the device

and I verified the details from the contacts

 

When I tap on the Phone app on the home screen

Then I see a dial page button

and Tap dial pad
and I enter the first, last name, phone number

and I tap Create new contact

Then I see a message indicating that the contact details are saved in the device

and I verified the details from the contacts

 

When I tap on the Phone app on the home screen

Then I see Call History tab and tap the phone number you wish to add to your contacts. (from Dialed,missed,Received Calls)

and Tap create new contact

and I enter the first, last name, phone number

and I tap save

Then I see a message indicating that the contact details are saved in the device

and I verified the details from the contacts

 

When I tap on the Phone app on the home screen

Then I see a dial page button

and Tap dial pad
and I enter the first, last name, phone number

and I tap ‘Update existing contact’

and I search for an existing contact and tap it

and I update the first name and tap save

Then I see a message indicating that the contact details are saved in the device

and I verified the details from the contacts

 

When I tap on the Phone app on the home screen

Then I see a dial page button

and Tap dial pad
and I enter the first, last name, phone number

and I tap ‘Update existing contact’

and I search for an existing contact and tap it

and I update the first name and tap save

Then I see a message indicating that the contact details are saved in the device

and I verified the details from the contacts

 

When I tap on Contacts on the home screen

Then I see an already saved contacts

and Tap on any one of the contact name
and I select Delete

Then I see a message indicating that ‘Are you sure you want to delete the contact details’

and I confirmed

and I verified the contact details are deleted from contacts


----------------------------------------------------------------------------------------------------------------------------------------

Test Cases for send SMS

----------------------------------------------------------------------------------------------------------------------------------------

Given that the message/SMS is sent to the recipient

When I tap/select ‘Messages’ on the home screen

Then I see + button

and I type the recipient’s mobile number in the recipients text box

and I write message in the text box

and select ‘Send’

and I see the status for the message is get updated as 'Sent' once the message is sent.

 

Given that message/SMS is queued in the database

When I login to the back end database and run the query

Then I see the message/SMS is queued in the database

And I see the status is updated to ‘Sent’

 

Given that message/SMS is delivered to the recipient mobile device

When the message is received, the mobile phone should notify recipient by giving out a sound or by vibrating

Then I see an indication in the ‘Messages’ panel

And I see a new message listed in the messages app with not read state

And I tap a new message to open

Then I see the message text as it is the message that was send by the sender

And I see the message is marked as read and it is saved in inbox with time stamp

 

Given that recipient replies back to the sender

When i select /tap the message that he/she want to reply to

and I select reply option from the list of options

and I write reply as 'Yes' in the text box below the message and tap send

 

Given that the sender receives a reply message from the recipient

Then I see an indication in the ‘Messages’ panel

And I see the mobile phone gives out a sound or by vibrating

And I see a new message listed in the messages app with not read state

And I tap a new message to open

Then I see the confirmation message as Yes

And I see the message status is changed to delivered and then the message is marked as read

And  I see the message status is updated as Delivered in the back end database

Given that the message/SMS is sent to the group of recipients/contact numbers

When I tap/select ‘Messages’ on the home screen

Then I see + button

and I type the recipient’s mobile number one by one in the recipients text box

and I write message in the text box

and select ‘Send’

and I see the status for the message is get updated as 'Sent' once the message is sent to all of contact numbers.

And I see the messages are queued in the database

 

Given that a huge message/SMS is not sent to the contact number

When I tap/select ‘Messages’ on the home screen

Then I see + button

and I type the recipient’s mobile number in the recipients text box

and I write huge message with special characters in the text box

and select ‘Send’

and I see the device is not allowing me to send the message indicating that the message text is exceed the limit

Then reduced the text in the text box and select ‘send’

And I  see the message is sent and is queued in the database

 

Given that the mobile is not allowing use to send message/SMS if the network is turned off

When I tap/select ‘Messages’ on the home screen

Then I see + button

and I type the recipient’s mobile number in the recipients text box

and I write a in the text box

and select ‘Send’

and I see a message indicating the message can't be send and turn on the network on the device

Then Turned on the network

And select ‘retry’

And I see the message is sent and is queued in the database

Given that the mobile is not allowing use to send SMS with empty text

When I tap/select ‘Messages’ on the home screen

Then I see + button

and I type the recipient’s mobile number in the recipients text box

and I see the send button is disabled and can’t tap on it

Then write a text in the message text box

And selected ‘send’

And I see the message is sent and is queued in the database

 

----------------------------------------------------------------------------------------------------------------------------------------

Test Cases for take a picture and upload

 

Given that, I have a working mobile device with a camera in it to take a picture

and I SIM card is inserted properly in it

When I tap/select ‘Camera’ on the home screen

Then I see camera is opened

and I take aim and focus and tap circle

and I see a picture is captured

and saved in the default mobile gallery

 

Given that, I have a picture in the device to upload it in to an external source

When I tap/select ‘Upload’ on the given link

Then I tap ‘Choose file’ or ‘Browse’

and I select a big picture from the default gallery

and I tap ‘Upload’

and I see a message indicting that upload is failed because the selected picture size is greater than the maximum allowed size

 

Then I again tap ‘Choose file’ or ‘Browse’

and I select a large picture from the default gallery

and I tap ‘Upload’

and I see the upload file process is failed indicating that the selected file width & length is more than the allowed size.

 

Then I again tap ‘Choose file’ or ‘Browse’

and I select a .doc/.xls/.pdf from the device

and I tap ‘Upload’

and I see the upload file process is failed indicating that the selected file format is not supported

 

Then I again tap ‘Choose file’ or ‘Browse’

and I select two pictures from the device

and I see that the device is not allowing to select more than one picture from the gallery

 

Then I again tap ‘Choose file’ or ‘Browse’

and I cancel selecting the picture and I didn’t select any picture from the device

and I tap ‘Upload’

and I see a message indicating that a file must be selected to upload

 

 

Then I again I tap ‘Choose file’ or ‘Browse’

and I select a .bmp/.JPEG/.JPG/.PNG file  from the gallery

and I tap ‘Upload’

and I see the progress bar with % of upload

and I see the file is uploaded successfully with a message indicting that the file is uploaded

and I see the uploaded file is displayed with the same resolution

 

 

 

Comments