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.

Error Solved: Binding Excel file as Data Source in Test Studio

Download free 30 days trial of TestStudio from here

Find more about Test Studio here

Okay, so have you come across this error while binding an Excel File as DataSource to a Test in Test Studio? You may get this error when you are working with fie saved in Excel 2013 format.

image

Now how to solve this error? Very easily you can solve this error by saving Excel file in Excel97-2003 Workbook format.

clip_image002

If you do not want and can save your file in Excel97-2003 format then probably you may want to check application log. To check application log follow these two steps,

  1. Navigate to Help Menu
  2. Click on Enable log to enable log in Test Studio.

image

In Log if you see something like Microsoft.ACE.OLEDB.12.0 is not registered on local machine then, you need to install Access Database Engine. You can download and install it from below link,

http://www.microsoft.com/en-us/download/details.aspx?id=23734

After installing it you should able to work with Excel file regardless of it format is Data Source in Test Studio.

I hope this post useful. Thanks for reading.

Download free 30 days trial of TestStudio from here

Find more about Test Studio here

Recap of webinar Journey from Manual to Automated Tester

image

On 12th December 2013, we conducted webinar on Journey from Manual to Automated Tester in 1 Hrs. We had great time teaching Automated Testing over web to audience of more than 150.

Download free 30 days trial of TestStudio from here

Find more about Test Studio here

In webinar we covered following topics,

  • Why to automate a Test
  • Advantage of Test Automation
  • Getting started with Test Studio
  • Record and Play a Test
  • Cross Browser Testing
  • Data Driven Testing
  • Test Lists and Scheduling

If you missed webinar then you can view recorded webinar below,

 

Some of the Questions and Answers from webinar are below,

Which all technologies that can be automated by Test Studio?

TestStudio can automate functional Testing of

  • Web Applications
  • Desktop Apps created using WPF
  • Load Testing
  • Load Testing of Web Services
  • Load Testing of Mobile Apps

Can we perform Load testing for more than 100 virtual users?

Yes Load Testing can be performed with more than 100 Virtual Users. Learn more about Load Testing here,

http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/load-testing.aspx

Can we do automation testing for excel application?

What I understand from this question that you want to automate testing of

  • Reading Excel file
  • Verifying whether data being written to Excel file.

Yes you can do it using CODED STEPS. You need to write C# Code using File System API and Excel API to achieve automation .Learn more about Coded Steps here

http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/coded_steps.aspx

What programming languages does it support?

Test Studio supports below programming languages,

  • C#
  • VB.Net

Can test studio access Linux System?

No Test Studio does not work on Linux system. As of now Test Studio supports only Windows.

Can you please show how we parameterise the user name and password?

As shown in demo you can do it using Data Driven Testing. Learn more about Data Driven Testing here,

http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/data-driven-testing.aspx

When you choose any Browser for test recording

Learn more about recording here,

http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/recording-tests.aspx

How this tool is handled browser pop-up?

Learn more about handling popup here,

http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/dialogs-and-popups/dialogs.aspx

Is there any option for automating silver light application?

Yes Test Studio supports automation testing of Silverlight application. Learn more about that here,

http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/write-tests-in-code/silverlight-test-automation/introduction.aspx

Does it support flex?

Unfortunately Test Studio does not support Flex application testing.

Can we do testing for Kendo UI applications?

Test Studio supports out of box testing of Kendo UI Widgets. See Kendo UI Grid testing video here,

http://tv.telerik.com/watch/automated-testing-tools/testing-kendoui-grid-with-test-studio

Webinar was highly demo oriented and PPT had very less role to play. However if PPT interests you then find it below,

Download free 30 days trial of TestStudio from here

Find more about Test Studio here

clip_image002

Telerik TestStudio: Subscription based Automation Testing Tool

image

Telerik TestStudio is now subscription based. Now as user you have three options to choose from.

Learn more about Purchasing Options

image

You have now monthly and yearly subscription option. You can choose among three bundles as per your requirement.

There are many added and imprived features with this release. Some of them are as follows,

  • Load Testing Traffic from Mobile Devices
  • Load Testing of Web Services
  • Extended Support for HTML5 Controls
  • Improved Browser Calibration
  • TeamPulse Integration Improvement. Etc.

Learn what is new in TestStudio

I hope you will find new subscription based model along with new features exiting. Test Studio rocks.

How to change default waiting time to find Element for a step in Test Studio

Learn more about Test Studio here

While talking to customers I come across one common question that, “How can we change default waiting time to find element for a particular Test Step? “

Let me start with explaining this question little bit more. So when you record a test, TestStudio saves information about elements in Element Repository. While executing test, TestStudio try to identify element in Element Repository on basis of Identification Logic saved. TestStudio waits for 30ms to find element.

Now there could be scenario when 30ms is not enough and you want to change this default wait on step value. Let us learn how can we change this?

To change default wait to find element in a step, click on edit steps. You will get an option of UseStepWaitOnElements. You need to check the check box as given below.

image

Once you check this check box, next go to step property. There you will find WaitOnElement property field editable. Here you need to put desired wait time to find an element for a particular step.

clip_image001

This is what all you need to do to change default wait time for elements. I hope you find this post useful. Thanks for reading.

Telerik Test Studio participated at STC 2013

Learn more about Test Studio here

See Photos from Event here

We are happy to announce that Telerik team was present at STC 2013 on 4-5th December in Bangalore. We had great time talking, interacting and advocating our products to esteem audience. Telerik had a booth at the event and we witnessed great response from audience at booth.

Download 30 days free trial of Test Studio from here

image

It was one of the premiere event with large number of audience. There were industry known speakers and audience from profile of Test Director to junior level Test Professional.

clip_image002

Our Evangelist Dhananjay Kumar did two presentations at event. At first day he gave a Test Studio tool demo. Second day he had a talk on “A Look on Automated Web Testing”. In talk he focused on how to handle dynamic id and Ajax in web test automation.

clip_image004

We gave away more than 100 Telerik Ninja TShirts and Nexus 7 Tablet to winner of lucky draw.

clip_image006

We had great time at the event. If you have any further queries feel free to write us at Dhananjay.kumar@telerik.com

Download 30 days free trial of Test Studio from here

Handle Dynamic Id with ease in Test Studio

Learn more about Test Studio here

Download 30 days Free Trial Here

Okay, so I will start this post saying there is not a single golden rule to handle dynamic id while automating Test. It depends, I repeat it depends. In this post I will focus on various ways you can handle dynamic id in Test Studio.

clip_image002

In this post we will learn to deal with dynamic id in three different ways,

  1. Handling with changing setting at Test Project level
  2. Handling with changing setting at Element level
  3. Handling with Coded Step

Scenario # 1 : Test Project Level

Let us say you are sure that id is going to be dynamic throughout the application. And you cannot rely on id to identify element. In this scenario Test Studio allows you to configure Identification Logic at the Test Project level. You can change that in Project Settings.

By default Test Studio finds and element on following identification logic. It search on the id AND tagname. This is set for the Test Project level.

clip_image002

Now we know that id for application in test is going to be dynamic and we want to change the FindLogic to some other tag. In other words we want to change default Find Logic for whole Test Project. To do this navigate to Project Settings.

You can browse to FindLogic setting of Test project by clicking on

Project -> Show Setting

clip_image004

In Project Setting dialog box click on identification logic. Here you can find identification logic and change it as per requirement to your project.

clip_image006

As you can clearly see that by default Test Studio find an element on its Id. If you consider that Name of the elements are not expected to change frequently then you can consider to change project setting to find an element on its Name attribute.

To change FindLogic select any attribute then click on up/down arrow to change its position. For example Name is at second from top. To make it first attribute on which Test Studio will find element select Name and then click on up arrow button to bring it at the top in the list.

clip_image008

In this way you can configure FindLogic. You may notice that if required you can add new Tag to list as well. After reconfiguring Identification Logic you can find that now FindLogic for whole Test project (recording which will happen after changing logic) has been set to name and tagname.

clip_image010

Scenario # 2 : Element Level

Second scenario could be you need to change identification logic only for a particular element. You do not want to change identification logic for whole Test project rather for a particular element. Test Studio allows you to do that as well. To do this select element from Element Repository and right click. From context menu select Edit Element.

clip_image001

When click on Edit Element, next you will get various options to Find Element.

clip_image003

Let us Find Element in Live Version. To find element in Live Version make sure that application is already open in browser. Since already application is opened here so select open Current Page and select application from drop down.

clip_image005

After navigating to application you will find Elements current FindLogic.

clip_image007

To delete current logic move mouse and you get option like below to delete current filter.

clip_image009

After deleting both filter let us use XPath to find element.

clip_image011

This is what all you need to change FindLogic for a particular element. You can see in Element Repository that FindLogic has been changed to XPath.

clip_image013

Scenario # 3 : Code Step

So far in above two scenario we saw that if Id is dynamic we can change it to some other attribute of element like Name, XPath etc. Now there could be scenario that you cannot rely on any attributes.

XPath gives you positional based FindLogic. Consider scenario of a Grid. In Grid you need to automate test to find an Employee ‘e2’. Say e2 is second employee in database and is listed in the second rows of Grid. You can put verification step as below,

clip_image001[6]

Now above test will fail if order of elements in Grid is changed. So in this kind of scenario you cannot rely on either id or XPath of element.

There could be many ways you can fix and automate test to find whether employee e2 exists in db or not. Test Studio allows you to write your custom logic using Coded Step. So we can write a coded step as below.

clip_image002[6]

In above coded step, we are finding reference of Grid then searching Employee ‘e2’ in whole grid and then asserting if count is equal to 1 to verify existence of Employee e2.

So in this scenario we are not finding element on any of the attribute and writing our own logic in script to find element.

Conclusion

We learnt in this post that there are various ways to deal with dynamic id. Again there is not a single bullet proof method to deal with dynamic id. It depends on the scenario that how dynamic id cane be handled while automating test.

Learn more about Test Studio here

Download 30 days Free Trial Here

How to detect problems in browsers to work with Test Studio

Learn more about Test Studio here

Often I get questions from customers that how I could detect if there are any configuration setting missing to work with different browser in Test Studio. This can be easily detected. Very first before you start working with Test Studio in different browsers make sure you have configured them.

Read here to configure browser

After installation you can detect browsers or configured or not in Project Setting.

image

In Project Settings you will get option Browsers. In that you can see a message below each type of browsers that “There is a problem with this browser

image

You have option to calibrate browser right from there. You will get message to close instance.

image

Once browser is successfully calibrated you can see message below browser that “The browser is ready for playback

image

In this way you can detect configuration setting of browsers to work with Test Studio. I hope you find this post useful. Thanks for reading.

How to create Support Ticket from Telerik Test Studio Desktop

Learn more about Test Studio here

In this post we will take a look on creating Support Ticket from Test Studio Desktop. To create support ticket after launching Test Studio Desktop click on Help in top menu

clip_image002

After clicking on Help menu in ribbon you get option to Submit Ticket. Click on Submit Ticket to create a support ticket.

clip_image004

Now either you need to create a new Telerik account or login with existing account. I am login with existing Telerik account

clip_image005

After successful login, you will be provided with options from various products. Select TestStudio and click on Contact Support Team

clip_image007

You will get option to create Support Ticket under product Test Studio. If Test Studio is expired for you then you will get message as like below,

clip_image009

These steps you need to follow create Support Ticket. I hope you find this post useful. Thanks for reading.

Learn more about Test Studio here

Presenting in SiliconIndia SOFTEC 2013

To present in SOFTEC I will be in Bangalore from 7th June to 9th June. Intrested in doing a demo of Test Studio for your team ? feel free to send me mail at dhananjay.kumar@telerik.com

clip_image002

I will presenting on topic “A look into Automated Web UI Tests “At SiliconIndia SOFTEC 2013 in Bangalore on 8th June.

If you are attending conference then do not forget to bump at me and introduce yourself.

Read more about conference here

Abstract of my presentation

There are some misconceptions around automated Web testing. Do you really need it? Is it easy? Does one needs to know fair amount of programming to automate tests? In this session we will focus on demystifying web testing. And we will learn some best practices.

We will discuss the benefits of UI automation. We will discuss the various deciding factors of automating tests and how to prepare your application for automation. Your development team and test team need to work cohesively for the best result. We will get into detail discussion of when to automate and when not to automate a test. How do we structure and effective test project? How do we create reliable automated UI tests? How do we deal with dynamic content? How to use a data-driven testing approach? All of these questions will be addressed. This session will be combination of theoretical concepts and a live demonstration to understand best practices of flexible locators, data driven testing, modular testing, recording and executing various kind of tests.

I am excited to see you at conference. If you want me to do a demo of Test Studio for your team then feel free to send me mail on Dhananjay.kumar@telerik.com .

How to add .NET Assembly or Reference in Test Studio standalone version

Recently I was demonstrating Test Studio to a group of Test Studio professionals. While working with Coded Step I had to add a .NET Assembly Reference. Adding reference in Visual Studio plugin is quite simple. However adding that in Test Studio standalone version requires certain steps.

In this post we will have a look on adding assembly reference in Test Studio standalone version. Follow following steps,

Select Project option in top menu

image

Click on Show Settings in project tab

image

On clicking on Show Settings you will get Project Settings dialog box. In dialog box click on Script Options. To add assembly reference click on Add Reference.

image

When you clock on Add Reference Test Studio will open File Chooser dialog box. In that browse .NET Assembly Reference location in file system and select that to add as reference in current Test project. I hope you find this post useful. Thanks for reading.

image

Join me for the webinar Automated Functional Testing Can be affordable with Test Studio

Register to attend webinar here

When: Thursday, March 21, 2013 3:00PM to 4:00PM India Time

clip_image001

Should your functional testing only be manual? Are you shying away from testing only because of the cost considerations? Are you paying through your nose to maintain your testing tool? In this webinar, we will talk about an affordable solution that covers the testing capabilities you need. If you are enthusiastic about finding bugs in software and find solace in testing, we have a Ninja tool for you. Explore this chart buster software – Telerik Test Studio from the comfort of your seat. We are excited to invite you for a webinar on Telerik Test Studio.

In this webinar we will cover and see how easy it is to do

  • Automated Web Testing
  • Data Driven Testing
  • Working with Test Lists
  • Test Result Analysis and Reporting
  • Ajax Testing
  • Performance Testing

To attend webinar register here

I am excited to see you in webinar on 21st March 2013 at 3 PM India time.

Question and Answers from “Performance and Load Testing with Test Studio” Webinar

I would like to thank everyone for attending webinar on “Performance and Load Testing with Test Studio”. Please find below answers of the questions come up in the webinar.

How to encrypt the password and please can you show us how to handle the parameterization?

Password encryption is set via the property panel for that test step.

image 

How to handle dynamic objects?

See the Video here

Can we do Performance test & Load test with third party application that do not run through browser

Test Studio support web applications. Other applications are not supported.

Test Studio is only for .NET testing not for the JAVA or other testing. Can it test standalone java application?

Test Studio will test any web, Silverlight, or WPF application. The web application can be written on any platform. Java, Ruby, .NET, Python, PHP, it doesn’t matter as long as HTML is sent across the wire.

How many computers we can select at one shot during performance testing

We support multiple computers. We’ve tested with large configurations.

Can we have test suites for the performance testing?

Yes. Test Lists may be created which focus on performance tests.

Can we have custom performance counters added?

Custom counters will be available if they are added through the Windows Performance counter infrastructure.

Describe how to identify the memory leakage using Telerik Test Studio

Memory leakage would be monitored by using performance monitor counters for memory usage. (Total available bytes, garbage collection, etc.)

What criteria would you use to select Web transactions for load testing?

If by “transactions” you mean use cases, then you want to select as many different ones as possible in order to model your site’s traffic as accurately as possible.

How to use Regular Expression in Load Runner for web functions

This webinar is about Telerik’s Test Studio. Please see HP for questions about Load Runner.

Can do the Regression Testing also by using Test Studio

Yes. Automated tests are perfect for regression testing.