Posts

Sheduling tests - Running Tests From the Command line | Telerik Testing Framework

Image
Telerik test studio   Has its own test scheduler so you can schedule tests from the Telerik IDE itself, but what if you're using there Free framework? Telerik Testing Framework Scheduling can be done using couple of methods, If you have Team foundation server  (TFS) you can create a CI module for this can if you have Microsoft Test Manager you can schedule and run the tests. If you don't have any of those tools but if you still want to schedule and run your tests this is a very simple method you can use. Just follow the below steps Step 1: Add a test settings file. Right click on your visual studio solution select Add > New Item Select Test settings Tab on the right and click on  Test Settings File to your project [Figure 1] Figure 1 No need to add or change any properties in the Test Settings file at the moment, just close it Build your solution Step 2 Create a text file, you can use notepad or Notepad++ for this task Copy the b...

Handling dynamic IDs from Telerik framework

Usually in automation there is a golden rule not to automate changing requirements that is because if you do that  the ROI that you are gaining from your automation suite is very little. but what if your elements in your automation application is changing?  Are you not going to automate it? The answer is NO!! If you are automating an application with dynamic ID generation look very closely at the changing IDs. If you check one element from different browsers you will see that there is always a static part  for the IDs but a dynamic part is added to the static ID to generate an unique ID to the element. This could happen if you're automating an application which uses a mechanism to generate webpages like Episever, Sitecore, Crownpeak, Kentico. In all these systems there is a underlined webpage generation method so this might generate elements with dynamic IDs Example: Imagine your login button has a dynamic ID :  relateLoginbtn_Ctl012 if yo...

Drag and Drop with Telerik Testing Framework

Posting a blog after a long time, so I'm not gonna add a huge description here. Most of the user friendly web applications support drag and drop commands/actions and even though lot of test automation IDEs support drag and drop its dosent work most of the time, Trust me I have tired. So on today's post we will discuss how to perform this simple task using Telerik Test studio Step 1 First you have to identify which are the two elements you're going to use for this operation Eg: I'm using 2 HTML div Elements ids: dragitem, droptiem Since you're using a code first method first you have to identify the 2 elements in the web browser HtmlDiv Dragitemspan = ActiveBrowser.Find.ById("dragitem").As<HtmlDiv>(); HtmlDiv dropitemspan= myManager.ActiveBrowser.Find.ById("dropitem").As<HtmlDiv>(); This is the vary basic method of identifying an element in Telerik test studio, you could use page object class or a pag...

How to take screenshots of a failed test with Telerik Testing Framework

Image
This article is about taking a screenshot with Telerik Test Studio Free Framework. If you want to know how to write tests with Telerik Test Studio Free Framework refer my Previous posts Lets Start, First you need a test clean up method, If you're using a VS test Project given from Telerik testing framework its already on your VS test template like in the below screenshot [Figure 1], else you can create a new test method. Figure 1 If you're creating a new Cleanup test method, follow the below syntax // Use TestCleanup to run code after each test has run [TestCleanup()] public void MyTestCleanup() { // // Place any additional cleanup here // #region WebAii CleanUp // Shuts down WebAii manager and closes all browsers currently running // after each test. This call is ignored if recycleBrowser is set this.CleanUp(); #endregion } This is copied from the Telerik Fre...

Create a simple automation test with Telerik Testing Framework

Image
Automating with Telerik Test Studiois really simple and its free!!!  its just a matter of creating a test in Visual studio and you are set. The following article is about how you create a simple test in Visual studio using Telerik testing framework First of all you should download and install the Telerik Testing Framework, as I said before its free and its a very powerful framework. Use the below link to download Telerik Testing Framework, did I mention that its FREE?? Download Telerik Testing Framework Now install the package, to your computer. Open visual studio Select New project create a Unit test from Visual Studio, If you're using Telerik Test studio Free framework Use Visual studio as your IDE. You could select new project like in the Figure 1 screenshot and select "Unit Test Project" Figure 1 Then Select new Item and Under Test  you can select new VsUnit test from adding a new Item. You can use a Simple Unit test for this but then you...

Create a Data Driven Test with Telerik Testing Framework | Adding the Data file to a Folder

Image
Automating with Telerik Test Studio using data driven testing is simple, its just a matter of clicking on some controls and you are set. IF you need any information regarding that please click on the following link URL:  http://docs.telerik.com/teststudio/features/data-driven-testing/overview But if you're using Telerik Test Studio free framework for your test automation  its not easy as clicking on buttons. But its not that hard. First of all you should create a Unit test from Visual Studio, If you're using Telerik Test studio Free framework Use Visual studio as your IDE. You could select new project like in the Figure 1 screenshot and select "Unit Test Project" Then Select a New VS unit test from adding a new Item. You can use a Simple Unit test for this but then you have to write the initialize and tear down methods by yourself. So use this "VS unit test " option Then you can create a Test Method in that Unit test Your new te...

How to Handle an Upload Dialog via Telerik test studio

How to Handle an Upload Dialog via  Telerik Testing Framework Handling an upload dialog in test automation is quite tricky since the dialog is generated from the browser not the application it self, In Telerik you can record this function but you cannot see the inline code of the function Actually its pretty easy, Here is the code to upload a picture from your telerik automation suite via a upload dialog eg: picture is in C drive C:\\mypicture.jpg Steps 1. Create a variable for the uploaded picture var x = new ArtOfTest.WebAii.Win32.Dialogs.FileUploadDialog (ActiveBrowser,"C:\\mypicture.jpg", DialogButton.OPEN); 2. Initiate the dialog Manager.DialogMonitor.Start(); 3. Close the dialog Manager.DialogMonitor.AddDialog(x); 4. Create an object for the browse button HtmlInputFile choose = ActiveBrowser.Find.ById<HtmlInputFile>("Id of the browse button"); choose.Click(); 5. wait till the upload dialog ...