This is a migrated thread and some comments may be shown as answers.

Data driven test problem

3 Answers 158 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
sabarishbabu
Top achievements
Rank 1
sabarishbabu asked on 08 Dec 2010, 01:54 PM
Hi,

         1. I have done Data driven test for a test with the follwoing steps.
  • Created a new user for my project with this tool recorder.(this UI have 10 fields)
  • Then i have added 10 users(with the 10 fields data) in excel and connected with the test.
  • While executing the test, it takes the user name alone from the excel, other field datas are not taken from the excel.
  • Then it takes the 2nd user name from the excel and continue the testing upto the last user.
  •  Finally the test is failed.
I need solution for this problem. I have done the datadriven test for another ui which is having two fields only its completed successfully, but if the ui have more fields, i faced the above problem.

2. In Data driven testing if one record is inserted, then it logout of the application, and then continue the process from step 1.But i want to continue the data driven test within the Ui itself, no need to logout and relogin.I have tried with if..then loop, but its not working.

Please give solution for both problems..

thanks,

3 Answers, 1 is accepted

Sort by
0
Keaegan
Telerik team
answered on 10 Dec 2010, 12:21 AM

Hello sabarishbabu,

For this type of setup, it sounds like you want to (or already have) two (2) columns within your database. One column should be named User or something similar, the other should be named pw (short for password) or something similar. This type of symptom will occur if you target the same column within the test step itself.

What I mean by this is, if you have both the input username and the input password test steps databound, and both targeting $(User), you may receive similar feedback. However, most likely the test step you have for inputting the password is targeting a column that does not exist within the spread sheet.

The easiest way to know the root of the error is to review the logfile for the test in question. I have included a screenshot that shows where to click within QA edition (after the test executes and fails) to locate the logfile. Please compress the logifle to .zip or .rar and attach it to your reply if the above suggestion regarding confirming column name does not apply to the test setup (ie. you have the columns currently named and referenced correctly).

Alternatively, you can also provide us with a full log of the issue by doing the following:

  1. Open QA edition and the project.
  2. Execute the test, wait for it to fail.
  3. After it fails, double click on the red X for the step that failed (circled blue in provided Fullreport.png).
  4. This will bring up the Step Failure Details window. Click the Export Result to file button (highlighted red in the Fullreport.png image).
  5. Save it somewhere convenient, and include the created .zip file as an attachment in your reply

Most likely, we will only need the logfile, but the 2nd method provides us with a wealth of information (such as screenshots of what was expected versus what occurred). We'll look for your reply with the log data if the column name for the password column is correct.

Kind regards,
Keaegan
the Telerik team

Interested in Agile Testing? Check out Telerik TV for a recording of Automated Testing in the Agile Environment
0
Deepti
Top achievements
Rank 1
answered on 29 Apr 2011, 12:31 PM

Hello,

I am trying to create a simple test where I create a  new test organization, once it's created, I verify if the newly created org is displayed in the list.

I am using the local data table for feeding the data.

My create org statement, where I type the new org name is data driven as follows:

I selected the step, in the properties dialog, corresponding to the Bindings property, I selected
typedtext attribute and set the value as $(NewOrg) 
(Note: NewOrg is the column name of the local data table column from where I would like to feed the org names)
I did the same for RecordedTestContent attribute and set the value as $(NewOrg) for the same step.

The following statement is generated in my test script.
Type 'Org_Test_01' into TbNameTextbox - DataDriven: [$(NewOrg)][$(NewOrg)]

Now, for Verify statement the follows, I performed the same procedure and set the 'Value' attribute's value as $(NewOrg). This is did while creating the builder statement.
The steps looks like this:

Verify Testorg01Textblock.Text 'Contains' '$(NewOrg)'

Problem: The issue is that at runtime, the actual value reads as testorg01 (as fed from the data table), but the expected value is $(NewOrg), I am not sure why the expected value isn't coming from the data table itself. Just like it comes while creating the organization.

Can you help? I am quite new to the tool.

Thank You!

Regards,
Deepti

0
Cody
Telerik team
answered on 04 May 2011, 10:33 PM
Hi sabarishbabu,

We need to a copy of your test project for us to analyze what may be causing this problem. Please put your entire test project into a .zip file first and attach that .zip file. Please also identify the test and test step that is failing.

Kind regards,
Cody
the Telerik team
Do you think you know all the new features coming out in Test Studio R1 2011? Think again - we have some surprises and will share them with you in the What's New in Test Studio R1 2011 Webinar on May 12th.
Register Today!
Tags
General Discussions
Asked by
sabarishbabu
Top achievements
Rank 1
Answers by
Keaegan
Telerik team
Deepti
Top achievements
Rank 1
Cody
Telerik team
Share this question
or