Telerik Forums
Test Studio Forum
1 answer
64 views
Hi Telerik,

Scenarios:
1. Get the Count of the Combo List
2. Random Selection of values from the Combo list and Specified Selection
3. Load the Values From Excel to combo
4. set the Specified row for the Field
5. Get which row is running Current

 My application where we are using the metronic, kendo Tool to develop the Application, Here I am Unable to do the Above mentioned Scenarios,
Can any one help me to work on this.
Here I have Attached the Screen short of my Application



Ivaylo
Telerik team
 answered on 09 Sep 2014
9 answers
364 views
Hi,

I am using Test Studio Standalone, as per the override app.config guide, i cut and pasted the VB code. I added the references (System.Configuration), System.Reflection namespace already existed.

I am getting a runtime error.....

InnerException:
System.Configuration.ConfigurationErrorsException: An error occurred loading a configuration file: The parameter 'exePath' is invalid.
Parameter name: exePath ---> System.ArgumentException: The parameter 'exePath' is invalid.

code:

Public Sub readExcel_CodedStep3()
'Navigate to : 'http://www.google.com.au/'
ActiveBrowser.NavigateTo("http://www.google.com.au/", true)
 
Dim [me] As Assembly = Assembly.GetExecutingAssembly()

Log.WriteLine([me].ManifestModule.Name)
Log.WriteLine(Me.ExecutionContext.DeploymentDirectory)

Dim config As Configuration = ConfigurationManager.OpenExeConfiguration(System.IO.Path.Combine(Me.ExecutionContext.DeploymentDirectory, [me].ManifestModule.Name))

Assert.IsNotNull(config)


Dim url As String = config.AppSettings.Settings("LoginPageUrl").Value
'Log.WriteLine(url)

Dim name As String = config.AppSettings.Settings("LoginName").Value
'Log.WriteLine(name)

Dim pw As String = config.AppSettings.Settings("Pass").Value
'Log.WriteLine(pw)

Dim UserId As String = config.AppSettings.Settings("UserId").Value
'Log.WriteLine(UserId)

Dim conn As String = config.ConnectionStrings.ConnectionStrings("ConnectionString").ConnectionString
'Log.WriteLine(conn)

End Sub


Appreciate if someone can provide help please.

Thanks
Govind
Cody
Telerik team
 answered on 08 Sep 2014
17 answers
139 views
Hello,

I am having a problem running my test lists on remote execution server. Let me say first that tests work correctly and without problems localy, but the server is unable to execute those test that include or have included custom coded steps. (my observation)

It seems like test studio cant access AllHoursTest.dll. 

I am getting an error, which is posted bellow.
------------------------------------------------------------
'31.7.2014 10:26:51' - Executing test: '4.4. Team and employee filters are working', path: 'Whole Tests\4. Presence View\4.4. Team and employee filters are working.tstest.'
'31.7.2014 10:26:51' - Using .Net Runtime version: '4.0.30319.18449' for test execution. Build version is '2014.2.618.0'.
'31.7.2014 10:26:51' - Starting execution....
'31.7.2014 10:26:57' - Detected custom code in test. Locating test assembly: AllHoursTest.dll.
'31.7.2014 10:26:57' - Assembly Found: C:\Users\Administrator\AppData\Local\Temp\2\Projects\edac5f4b-18d8-4838-89df-56a91199366d\Test.Studio.AllHours.Tests\bin\AllHoursTest.dll
'31.7.2014 10:26:57' - Loading code class: 'AllHoursTest.__4__Team_and_employee_filters_are_working'.
'31.7.2014 10:26:57' - Failure detected during execution. Details:
------------------------------------------------------------
'31.7.2014 10:26:57' - System.ArgumentException: Unable to find the test class type 'AllHoursTest.__4__Team_and_employee_filters_are_working' in your test assembly. Please make sure your test code behind is compiled with your latest changes.
   at ArtOfTest.WebAii.Design.Execution.ExecutionUtils.EnsureTypeExists(Assembly assm, String typeName)
   at ArtOfTest.WebAii.Design.Execution.ExecutionUtils.CreateCodedTestInstance(Test test, TestResult result, String binariesFolder)
   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.InternalExecuteTest(Test test, TestResult initializationResult)
   at ArtOfTest.WebAii.Design.Execution.TestExecuteProxy.ExecuteTest(ExecuteTestCommand command)
------------------------------------------------------------
'31.7.2014 10:26:57' - Test completed!



Cody
Telerik team
 answered on 05 Sep 2014
1 answer
130 views
I noticed that Test Studio has a dialog handler for Windows systems dialogs. It appears that his dialog handle step is only available in Web tests created with Test Studio. We are putting a Win32 Dialog login for our WPF app. I was wondering if there was any way to get the "Handle 'Logon" dialog" test step to work with a WPF test file. When I have a WPF Test open, the dialog handle options are only "Save File", "Open File" and "Generic" options.

Is there code to these dialog handlers that I could possibly use to code my own test step and handle it on my own? On the dialog handler steps, the options to "View Code" and "Customize Step in Code" are disabled.
Cody
Telerik team
 answered on 05 Sep 2014
2 answers
87 views
Hello,

we are currently evaluating Telerik Test Studio and so far are pleased with the product. We do have, however, an issue regarding finding elements which have dynamic content, that is dynamic InnerText respectively TextContent. The workflow in our scenario is the following:

1. I log into our application
2. I create a new object and assign it a static name
3. I save said object
4. I use a search bar, entering the previously assigned name
5. The corresponding object is displayed
6. I click it and in the following dialog delete it

After having recorded this test, I modified steps 2, 4 and 6 so that they work with dynamic names. For steps 2 and 4 I added an extraction step so that I can use the extracted value for name assignment and searching. For step 6 I first took a look at the Find Expression of the recorded element, which was "tagname=span, TextContent exactly XYZ", where XYZ was the name I statically assigned. I then converted this step into a coded step, using the following statements:

1.Dim objectName As Object = GetExtractedValue("objectNameVariable") 'The variable used in the extraction step
2.Dim objectSpan As HtmlSpan = Find.ByExpression(Of HtmlSpan)("tagname=span", "TextContent=" + objectName.ToString())
3.objectSpan.Click(false)

While I believe that this code snippet should do exactly what the original Find Expression did (except that it works for dynamic names), it did not work reliably. Most of the time after step 5 (this step passed without problems) the desired HtmlSpan could not be found. Only when I went into debug mode and passed through the test steps very slowly, it succeeded sometimes. After having searched on your forums for a while I stumbled upon someone claiming that Test Studio sometimes clicks on wrong elements. There, a solution was found by adding the ActiveBrowser.RefreshDomTree()
System.Threading.Thread.Sleep(5000) method right before doing the click action. I did the same for my coded step, also adding a 5-second wait after refreshing the DOM (by using System.Threading.Thread.Sleep(5000)). With this code, the test ran successfully about half the time, maybe a little bit more. I added another call of RefreshDomTree() and another 5-second wait, and now it seems that everything is working fine. My code now looks like this:

1.'The span is located here
2.ActiveBrowser.RefreshDomTree()
3.System.Threading.Thread.Sleep(5000)
4.ActiveBrowser.RefreshDomTree()
5.System.Threading.Thread.Sleep(5000)
6.'The click action is here
  
I understand that problems like an outdated DOM tree can occur and I would be happy if the problem could be solved by adding one call of ActiveBrowser.RefreshDomTree(). However, having to add two calls of it including the following waits looks more like a workaround than a solution to me. Is there any other possibility to solve this issue? Unfortunately, I cannot provide any project files as our application is still under development and shall not be seen by third parties.

Regards
Julian
Boyan Boev
Telerik team
 answered on 05 Sep 2014
5 answers
339 views
Hi,

Can anyone tell me about the limitations of this tool as I am going to start to automate a new project using this tool and i didn't use this tool before?

Thanks,
Deepak
Ivaylo
Telerik team
 answered on 04 Sep 2014
5 answers
87 views
Hi,
I am using Test Studio Visual Studio plugin to create test cases. I am trying to find a way to get the items in RadGrid on page and iterate over each row to validate the data in each row / column is correct. While using the record option I can get the value for one cell at a time, but I cannot find a way to get the entire item collection.
Can you show me a way to get all items in grid and loop over the rows?
I have attached a simple demo of my site for your reference.

Note: I was unable to include Telerik.Web.UI.dll in demo site zip due to size constraints.

Thanks!
Cody
Telerik team
 answered on 02 Sep 2014
3 answers
312 views
Hello,

We experience random test failures while running Silverlight tests based on Telerik Test Studio. While the tests pass, just after a test finishes it receives an error saying 'The agent process was stopped while the test was running'. Most of the time tests pass, but about 5% of them fail with this error.

We are running tests via MSTest 2012 from a TeamCity build step. The test studio version is 2012.2, the machine is running Windows 8.1 x64

The following error occurs immediately in the Event Log:​

Log Name:      Application
Source:        .NET Runtime
Date:          8/22/2014 12:58:53 PM
Event ID:      1026
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      X
Description:
Application: QTAgent32_40.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Threading.ThreadAbortException
Stack:
   at MS.Internal.Automation.WinEventWrap.WinEventReentrancyFilter(Int32, Int32, IntPtr, Int32, Int32, Int32, UInt32)
   at MS.Win32.UnsafeNativeMethods.PeekMessage(MSG ByRef, HWND, Int32, Int32, Int32)
   at MS.Internal.Automation.QueueProcessor.WaitForWork()
   at System.Threading.ThreadHelper.ThreadStart_Context(System.Object)
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   at System.Threading.ThreadHelper.ThreadStart()

I tried debugging remotely and attaching VS to QTAgent32_40 process. When the exception occurs, the thread it occurs on is named 'MS UI Automation event queue processor.' Besides, there is always another thread named like 'Agent: adapter run thread for test 'X'...' with the following call stack:
  mscorlib.dll!System.AppDomain.Unload(System.AppDomain domain)
  ArtOfTest.WebAii.Design.dll!ArtOfTest.WebAii.Design.Execution.TestAppLoader.Dispose()
  ArtOfTest.WebAii.Design.dll!ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteTest(ArtOfTest.WebAii.Design.Execution.ExecuteTestCommand command)
  ArtOfTest.WebAiiVSIP.dll!ArtOfTest.WebAiiVSIP.WebAiiTestAdapter.Run(Microsoft.VisualStudio.TestTools.Common.ITestElement testElement, Microsoft.VisualStudio.TestTools.Execution.ITestContext testContext)
  Microsoft.VisualStudio.QualityTools.AgentObject.dll!Microsoft.VisualStudio.TestTools.Agent.AgentExecution.CallAdapterRunMethod(object obj)
  mscorlib.dll!System.Threading.ThreadHelper.ThreadStart_Context(object state)
  mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)
  mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)
  mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state)
  mscorlib.dll!System.Threading.ThreadHelper.ThreadStart(object obj)

So it looks like if a test finishes in a bad moment, its attempt to unload app domain leads to async thread abort on UI Automation Client thread. It is not handled, so it causes process termination. (See for example http://stackoverflow.com/questions/9416078/how-to-handle-appdomain-unload-and-the-related-threadabortexception)

Is there anything that can be done to mitigate the issue? Or do I need to file a bug via our license holder? This error makes our automated UI tests unstable and unusable.
Ivaylo
Telerik team
 answered on 01 Sep 2014
2 answers
50 views
Hi.

I've been creating small sub-tests for my test scenarios such as logging in, going to a specific page, ordering a product, etcetera. The goal is to be able to easily create varying test scenarios by using these small tests as building blocks. Now I've added in a data source to specificy my base URLs so I can run these tests on both test and acceptation enviroments, this is where this method seems to unfortunately break down.

When I add a datasource it automatically runs every test twice, one on test (row 1 of my excel sheet) and on acc (row 2 on my excel sheet), however it does this for every single substep. I want an entire testlist to finish while using data from row 1, and then another iteration of said testlist where it gets data from row 1. Right now it performs Step 1 twice, Step 2 twice, etcetera.

I've also tried creating one full test instead of a testlist where I use my small tests as test steps, but it still performs all of the possible iterations for step 1 before moving on to step 2. Is what I want not possible? If so, how would I ever go about testing an entire scenario on test before I do the full run on acc, without having to make one giant test without sub-tests in it?

Regards,
Sander
Miguel
Top achievements
Rank 1
 answered on 28 Aug 2014
4 answers
215 views
Hello,

I have the scenario for testing a workflow from start to end. The workflow is same but the scenario varies based on data. We have about 15 scenarios for the workflow but the data for each scenario is different.

We would like to test each scenario at least 5 times with different values. The data fields being large, having the data entered in excel sheet will be difficult for the tester to navigate the record from column 1 …. Column n.

We were looking at an alternative where we could have the record structured in xml, with name value pair. We plan to have the parent node, 5 child nodes, each child node will have one set of data where each row will be name value.

Here is the same xml.

<?xml version="1.0" encoding="utf-8"?>
<Approval >
  <data-1>
    <Fault label="IncidentType" value = "Fatal"/>
    <Fault label="IncidentDate" value = "01/01/2014"/>
    <Fault label="IncidentTime" value = "10:00"/>
    <Fault label="Location" value = "Surface"/>
    <Fault label="Detailedocationonsite" value = "Location"/>
    .
    .
    .
    .
    <data-1>
      <data-2>
        <Fault label="IncidentType" value = "Fatal"/>
        <Fault label="IncidentDate" value = "01/01/2014"/>
        <Fault label="IncidentTime" value = "10:00"/>
        <Fault label="Location" value = "Surface"/>
        <Fault label="Detailedocationonsite" value = "Location"/>
        .
        .
        .
        .
        <data-2>
          .
          .
          .
          .
          <data-n>
            <Fault label="IncidentType" value = "Fatal"/>
            <Fault label="IncidentDate" value = "01/01/2014"/>
            <Fault label="IncidentTime" value = "10:00"/>
            <Fault label="Location" value = "Surface"/>
            <Fault label="Detailedocationonsite" value = "Location"/>
            .
            .
            .
           .
            <data-n>
</Approval >


We will have one test data driven connecting to the xml file (datasource). The data table in TestStudio (2014TR1), only allows us bind only one table (i.e. data-1 or data-2, etc)..

Ideally would like to run the complete file once… We don’t want write to many custom coded steps since the testers do not have coding background.

Please share solution if anyone have implemented both coding and non-coding is welcome but using Test Studio UI.

Thanks
Govind
Shashi
Top achievements
Rank 1
 answered on 27 Aug 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Henri
Top achievements
Rank 2
Iron
Iron
Iron
SUNIL
Top achievements
Rank 2
Iron
Iron
Iron
David
Top achievements
Rank 1
Jackson
Top achievements
Rank 1
Iron
Iron
Tim
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Henri
Top achievements
Rank 2
Iron
Iron
Iron
SUNIL
Top achievements
Rank 2
Iron
Iron
Iron
David
Top achievements
Rank 1
Jackson
Top achievements
Rank 1
Iron
Iron
Tim
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?