Dynamic Values passing between test steps in Test Studio

Recently I was talking to a customer. He discussed a simple but important problem with me on test automation using Test Studio. He had a requirement to use values of variables from one test step in another test step.

To understand this problem in better way, consider below web application which is inserting data in database.

clip_image001

Let us try to understand this problem bit further. Suppose you have 6 test steps in test. In step2 user is typing UserName to be inserted.

clip_image003

To verify successful insertion of UserName in database, you need to do follow steps,

  • Read UserName inserted by user from step 2
  • Reading of username is done in step 4. So here you are reading value from step 2 in step4.
  • Use read value of step 4 to verify insertion in database.

In this post we are going to see how we can read variables value from one step in another step. In this case from step 2 to step 4 and then in step 6.

To use variable from one step in another you need Coded step. To add coded step select Test from menu and then Script Step from ribbon. In Visual Studio extension Coded Step can be added by clicking Add then selecting Coded Step.

clip_image001[6]

If you notice test steps in we have taken in example there are two test steps (step 4 and step 6) are coded steps. In step 4 we are reading user inserted value as below and assigning that to a public global variable.

clip_image003[6]

In step 4 (coded step) we read value from step 2 or in other words value from DOM element in which value got assigned in step 2. Now we need to read global variable value in step 6.

clip_image005

In this way very easily you can read variable values from one step in another step in a test project. I hope this post will help you. Thanks for reading.

Resources for webinar “Take your reports to any screen with Telerik Reporting”

On Feb 27 we presented a webinar on our Telerik Reporting suite. The webinar was titled “Take Your Reports to Any Screen with Telerik Reporting”. In this blog post we will recap the webinar for those of you who couldn’t not make it live.

Telerik Reporting:

image

Telerik Reporting is a lightweight reporting solution for all .NET cloud, web, and desktop platforms (ASP.NET, Ajax, Silverlight, WPF, Windows Forms, and Azure) which targets developers and end-users. Rich interactive and reusable reports can be created by developers in Visual Studio, and by end users in the desktop-based Report Designer. With the help of Telerik Reporting users can examine and probe data, export reports to Microsoft Office Word and Excel for further analysis, and even present them as PowerPoint documents.

To know more about Telerik Reporting check the product page here: http://www.telerik.com/products/reporting.aspx

Slide Deck:

Here is the slide deck used for the webinar:

Video:
We record all our webinars for the benefit of on demand viewing. So if you missed attending the webinar live don’t worry, here is the recorded video of the webinar:
 

Questions & Answers:

Q: Is it possible to convert existing reports in to this?
A: Telerik Reporting has conversion wizards for Crystal Reports, Active Reports and Xtra Reports.

Q: Is this compatible with ORACLE data source?
A: Telerik Reporting supports Microsoft SQL Server Analysis Services cubes, ADO.NET data sources, relational databases, business objects, ORMs and XML. So as long as ORACLE has a ADO.NET Data Provider we will support it.

Q: For Telerik reports do we need to take any other license like any telerik controls license with reports?
A: You can check our pricing section: http://www.telerik.com/purchase/individual/reporting.aspx

Q: What is the ReportBook?
A: You can read more about our ReportBook here: http://www.telerik.com/help/reporting/designing-reports-general-explanation.html

Q: Is there possibility to have chart and table is same report?
A: Yes. Chart and Table are what we call as Report Items. So they can be placed together and bind data accordingly. You can check our dashboard Reporting demos which showcase this.

Q: I have 5-10 reports with data displayed in different formats(table,graph…). I would like to apply same text font for all those reports. Is it possible?
A: Yes you can. You can use external style sheets to apply the same styles in different reports –  Exporting and Reusing Style Sheets

Q: is it possible to convert vs2010 local reports to telerik reports?
A: We do not have converters from SSRS reports, because there is a great difference in the reports’ structures.

T-Shirt Giveaway:

If you are a regular to our Telerik India webinars, you will know that we select 2 random names from the webinar attendee list and they get our cool Telerik .NET Ninja t-shirt. So here are the 2 winners from this webinar:

  • Rajan Thaora
  • Keerti Valmiki

Congratulations to the winners. We will contact you to get you address so that we can ship the t-shirt. Others don’t worry, you can try your luck in our next webinar.

Till next time – Happy Coding.

Vote for Telerik Webinars (March – April 2014)

It is election season in the country. As we host the largest democratic exercise in the world for the 16th Lok Sabha elections, it is the duty of every eligible Indian to cast his vote.

Image

Telerik India encourages its community to exercise their vote in the Lok Sabha elections. It is just not your right but also your duty.

And we are pleased to continue discharging our duty by bringing the latest technology webinars to you. Just like the results on May 16th will usher in the new Govt., development also has elected new paradigms – mBaaS, HTML 5 visualizations, App Analytics and MVVM. Our webinars will cover these emerging trends in March – April.

DATE TIME (IST) TOPIC
Thursday,
6 March
3:00 – 4:00 PM Unpeeling the Mobile Development with Telerik Platform Register »
Thursday,
13 March
3:00 – 4:00 PM One data for different kinds of Apps using Telerik Backend Services   Register »
Thursday,
27 March
3:00 – 4:00 PM Support Financial Charts, Sparklines & Maps in your HTML 5 powered web apps Register »
Thursday,
10 April
3:00 – 4:00 PM Add intelligence to your web, desktop & mobile apps with Application Analytics Register »
Thursday,
24 April
3:00 – 4:00 PM Using Knockout.js with Kendo UI Register »

This is the last series when we would be shipping the Ninja T-Shirts. Last chance to be the cool Ninja in the town too.

You can catch the archive of older webinars here: https://telerikhelper.net/category/webinars/

Devices as Test Agents in Telerik Mobile Testing

Telerik Mobile Testing is an automated testing solution for native, hybrid, and web apps. To discover more about this product, I would recommend reading Robert Shoemate’s blog post entitled, Introducing Telerik Mobile Testing, where he details our motivations for building the product along with its technical underpinnings. In this post, I’ll explain how to configure devices to integrate as test agents with this environment. As an example, we’ll explore to configure an Android device as test agent on a Windows machine. However, if you’re interested in learning how to perform testing against a native iOS app, make sure to check out Anthony Rinaldi’s blog post entitled, Telerik Mobile Testing – iOS Case Study.

Before I go ahead and show you how to add a device as Test Agent, let us try to understand few fundamental questions. For example,

  • What is a Test Agent?
  • Why we need Test Agent?
  • Why we need to add a real device as Test Agent?

Test Agent is a place in which you run the test. It could be a computer, emulator, simulator, browser or even a background process. Test Agent can be seen as an environment in which test gets executed.

Any serious mobile application should get tested before launching to various stores. As a tester you should or rather must test application on real devices. For instance consider Android platform, it has more than 1000 variations of devices and any serious Android application should be tested on some of them.  To test application on device you need to add them as Test Agent. Same challenges goes with iOS app as well. They run on various version of operating systems and you should test applications against almost all versions of OS.

Telerik Mobile Testing allows you to add devices as Test Agent. You can add any kind of Android or iOS devices and run test on them. You can add devices as Test Agent without jail breaking them and only requirement is that devices (Test Agent) and Test Runner should be connected to same Wi-Fi networks.

Telerik Mobile Testing allows you to add real devices and emulator as Test Agent at the same time. So any testing scenario in which application should be tested on device and emulator at the same time can be possible here.

image 

Following are the steps you need to follow to set up an Android device (Samsung Galaxy S3) as Test agent. However almost same steps you need to follow to add iOS app.

Step 1

In order to test native and hybrid apps on a device, you need to download and install the Telerik Mobile Testing companion app for iOS (App Store) or Android (Google Play). Once installed, the app will appear on your device as follows:

image

 

Step 2

Download and extract the Telerik Mobile Testing archive to your machine. Navigate to Telerik Mobile Testing folder and run start_win.exe. This will launch the Test Runner with its default configuration and open a browser window that points to the Test Runner execution environment.

 

image

 

It will launch Test Runner in browser.

image

 

As of now you there is no Agent added to the Test Runner.

Step 3

Launch the Telerik Mobile Testing companion app on your device:

image

When launched, the app will be not connected to the Test Runner. To connect it to Test Runner, click on setting in Application. You will find setting option in top right.

image

In Setting you need to provide IP Address of machine in which Test Runner is running. You can find IP address of machine by running ipconfig command on command prompt in Windows devices. Ensure that you have provided port address as 8081.

image

Once you have provided Host as IP Adress of machine on which Test Runner is running (You can provide host name also) and port address as 8081, click on Connect to connect device with Test Runner.

image

On successful connection you will get message in App as this device is connected and ready to run tests.

Step 4

Now you have device connected as Test Agent. To view it go back to Test Runner and click on Refresh Agents. You will find device has been added to Test Runner as Test Agent

image

Now you can select device as Test Agent and run the Application Test on real device. I hope this post will help you in setting up device as Test Agent with ease and explain you why you need to test application on real devices. Thanks for reading.