Test data - Deleted data gets executed

Hi there,

When I have deleted one of the row of the excel sheet [test data] from the source file and checked the data in TEST DATA, the serial no of the row was present in the data sheet.

When, I have run the loop for total number of rows and found that the loop gets executed for the deleted row as well… which is causing my test case to get failed.

please feel free to ask for any further explanation…

Hey Shweta,

question:

How do you execute tests - using Jenkins - Command line or from Katalon UI?

If you delete row from test data, It will get reflected once you close DataFile and open it again however while executing it will only consider remaining row.

Hi Rudra,

I am using Katalon UI … and already tried to close and reopen the test data… but the serial number remains same… and instead of running for 4 times, the loop is getting executed for 5 times… where it just clear the text from the input field and sets nothing.

Just to add

I am using
window 10
katalon studio 5.5.0
appium 1.8.1
Android for mobile testing - moto e, [OS - 5.1]

step to reproduce -

  1. Add 4 data in 4 rows of an excel sheet.
  2. Save the test data and give the path of the file to add it as test data
  3. After test data gets added, delete the 4th data from the source file, and save the file.
  4. come to katalon studio and reopen the test file.
  5. the serial number of the 4th row will remains.
  6. Now write a sample loop, which gets executed for total number of Rows present in the sheet.
  7. the loop will run for 4 times even though there is no data in the 4th row.

Note - The sheet is also having one header as well and checked the first checkbox of ‘consider 1st row as header’.

Can you take TeamViewr or some connectivity tool where we can connect? It seems specific issue to on how you are using your Test data as you have mentioned some kind of look in step 6.

Hi Shweta,

I can’t replicate your issue, but as far as I can remember I already encounter this problem, but I can’t remember when.

Can you provide your sample code? How many sheets do you have in your excel file?

Rudra said:

Can you take TeamViewr or some connectivity tool where we can connect? It seems specific issue to on how you are using your Test data as you have mentioned some kind of look in step 6.

Hi Rudra,

The teamviewer and other stuffs would not be possible, as it will revoke the NDA… sry for that…

Arnel said:

Hi Shweta,

I can’t replicate your issue, but as far as I can remember I already encounter this problem, but I can’t remember when.

Can you provide your sample code? How many sheets do you have in your excel file?

Hi Arnel,

the Sample code are as follows: -

for (def row = 1; row <= findTestData(‘Sign in’).getRowNumbers(); row++) {

Mobile.tap(findTestObject('Object Repository/Sign in/Email_InputField'), 4)



Mobile.clearText(findTestObject('Object Repository/Sign in/Email_InputField'), 3)



Mobile.setText(findTestObject('Object Repository/Sign in/Email_InputField'), findTestData('Sign in').getValue('Email', row), 4)



Mobile.tap(findTestObject('Object Repository/Sign in/Email_InputField'), 3)



Mobile.clearText(findTestObject('Object Repository/Sign in/Email_InputField'), 3)



Mobile.setText(findTestObject('Object Repository/Sign in/Email_InputField'), findTestData('Sign in').getValue('Password', row), 4)



Mobile.tap(findTestObject('Sign in/SIGN INButtonAtSignInScreen'), 8)

Mobile.delay(4, FailureHandling.STOP_ON_FAILURE)

Mobile.pressBack()

}

there is only 1 sheet present in test data…

TDSS1.png

Hi Shweta,

I think I replicated your issue. Try to delete the whole row. I what I mean is in your excel file there’s a number on the left side which indicates the row/line number. Click that and it will highlight the whole row you want to delete and then right click and choose delete. Deleting it per cell leaves a mark on the row which gives you a blank value. Yes, it’s blank but it’s not null. Give it a try.

Hope that helps. . . :slight_smile:

Thanks @7314-Arnel

it helped, while writing the explaination…noticed this and tried it…

Thanks for your help…!! :slight_smile:

You’re welcome. Glad it works… :slight_smile:

can a feature be added to katalon studio where it wont accept data if the first cell value is null or in any such a way