Telerik Forums
Test Studio Forum
3 answers
280 views

Hello,

I am testing out SQL Connection with Telerik code . It's simple function to fetch records from SQL server.

Here is code snippet. When I run telerik test with Coded Step ,It's failing on ExecuteReader() statement with error

"Exception thrown executing coded step: 'Tear Down'.
Incorrect syntax near ')'."

Test compiled fine and there is no syntax error on the output.

 

 

 [CodedStep(@"Tear Down")]
        public void DeleteCreatedAcct_TearDown()
        {
            SqlConnection conn ;
            SqlCommand sqlQuery;
            SqlDataReader  sqlDataSet;
            string  sqlQueryString;
           
                       
            conn = new SqlConnection("data source=DBTEST;initial catalog=DBName ;persist security info=True;user id=usrid;password=pwd");
            //Open SQL Connection
            conn.Open();
                      
            Console.WriteLine("DB Name");
            Console.WriteLine(conn.Database);
           
            //Create SQL Command
            sqlQuery = conn.CreateCommand();         
           
            sqlQueryString = "SELECT AcctId FROM DBtable where UpdatedBy ='Automation Tester')";
           
            Console.WriteLine(sqlQueryString);
           
            //Create SQL query to fetch records
            sqlQuery = new SqlCommand(sqlQueryString , conn);
           
            Console.WriteLine("After sqlQuery.CommandText =sqlQueryString" );
            Console.WriteLine("SQL Parameters" + sqlQuery.Parameters);
           
            Console.WriteLine("BEFORE EXECUTE QUERY");
            sqlDataSet = sqlQuery.ExecuteReader();           <<
failing at this line.
            
            Console.WriteLine("After  sqlDataSet = sqlQuery.ExecuteReader();" );            
            while (sqlDataSet.Read())
            {
                Console.WriteLine("Account ID: " + sqlDataSet["AcctId"] );
            }
            
                    
            
        }

Thanks,

-

Padmashree

 

 

 

 

 

Vera
Telerik team
 answered on 08 Jun 2018
8 answers
519 views

I have a visual studio project that contains a test studio web test.  The test contains coded step.

The project builds.  In Visual studio, I can run it either by

1) highlighting the test file (.tstest), then click on the green play icon to execute the test

2) Select visual studio Test menu, then run -> all test

Either way the test runs and passes.

 

However, when I try to run it from mstest using

%mstest /testcontainer:fullpath\TestStudioProject1.dll

 

I get "No test to execute".

 

What am I missing in the project?

Vera
Telerik team
 answered on 05 Jun 2018
3 answers
97 views

Hi

I am trying to call/execute Test1 in Test 2. Basically I am creating basic  CRUD tests on UI and I have test for Login and trying to below scenarios.

1) Creating Login Test  - Done . I have modularized it and combined login steps into one CodedStep_Login()

2) Creating 'Create' Test - Done

3) Now I want to execute login steps in 'Create' test .  Is it possible to call CodedStep_Login() into Create Test?

   How to verify that Login is passed and if so execute create test.

Appreciate you help.

Thanks,

-

Shree

 

 

 

 

Vera
Telerik team
 answered on 04 Jun 2018
3 answers
123 views

I am having issues with fields being focussed to the top underneath a DIV in our web app. Is this still the only solution?

 

Posted 09 Dec 2015Link to this post
Hello Uroš,

This is a somewhat common problem. Your application has an overlay <div> element at the top of the browser window. Test Studio, when you have SimulateRealTyping, selected always wants to scroll the element to the top of the browser window in order to make sure it's visible in the browsers window before trying to type into the input box. Unfortunately in your case this has the side effect of scrolling it underneath your overlay div.

The only way to over come this is to convert the step to code then comment out the ScrollToVisible line of code, like this:
// Enter text 'passUser' in 'UsernameText'
Actions.SetText(Pages.CAFFA.UsernameText, "");
//Pages.CAFFA.UsernameText.ScrollToVisible(ArtOfTest.WebAii.Core.ScrollToVisibleType.ElementTopAtWindowTop);
ActiveBrowser.Window.SetFocus();
Pages.CAFFA.UsernameText.Focus();
Pages.CAFFA.UsernameText.MouseClick();
Manager.Desktop.KeyBoard.TypeText("passUser", 50, 100, true);
The side effect is now you have to take extra care to insure the input box is visible before that step runs. Else typing won't go into that input field.

Vera
Telerik team
 answered on 31 May 2018
8 answers
161 views

Hi all,

we're using Test Studio (ultimate edition, trial version) and we're evaluating if this tool is compliant with our needs.

We are stuck in a particular record sequence: we have a Main window inside of which we have a dialog box overlapped to another one. The issue is that Telerik doesn't record the actions of the top dialog box.

Is it possible to resolve this problem?

Thank you in advance

Christian

Vera
Telerik team
 answered on 30 May 2018
3 answers
296 views
Hi,

I'mdoing a eval for my company of Test Studio, and so far the bake tests are going well wiht the functions that we would like to implement it.  I just have one quesiton:  Is there a way to capture the javascript console normally captured in IE's Developer Tools or FireFox (via Firebug) logs.

Is this something that can be done within Test Studio or should I look to try and solve this issue with C#? 

Thank you,
Carl
Elena
Telerik team
 answered on 30 May 2018
3 answers
174 views

Hello

One of our users is presenting problems when she is working on TestStudio. At the moment of capturing traffic, ArtOfTest.Runner crashes everytime randomly on 1 step out of 1000. We are using Chrome since it is the neccesary browser for our work.

The laptop has a processor of 2,30 GHz, 8Gb of RAM (we tried one time with 12Gb but it happened the same error), we even tried with another laptop with similar characteristics and still fails. The OS is Windows 10 x64.

 

How can i resolve this?

Thanks in advance.

 

 

Elena
Telerik team
 answered on 30 May 2018
18 answers
276 views

Hi,

I am trying test  a native app using test studio mobile testing (android). the app is installing in the device but when I click the record button, a error message is displaying saying "command to message server time out". before recording, I did the below steps

1.installed the agent app from the android app store in to the mobile device

2. connected the device and configured the android app to be testable using the build in configuration

3. selected the device for recording and selected the app identifier 

 

can you please tell me why is this happening. Is it a issue in the apk i am using?

 

you can download the apk file from the below link

https://www.dropbox.com/s/h0xip5bq9y73hu3/Assura%20Premium%201.5.4.apk?dl=0

Elena
Telerik team
 answered on 28 May 2018
3 answers
117 views

Hi guys,

I've having trouble detecting an element using Telerik Test Studio. It's an element in Sharepoint Online in IE11.

I'm looking to click and select the "Business Development CORP Set" selection as shown in image (Business Development CORP set.PNG) but Telerik Test Studio can't detect the element. 

When i use normal recording option, Telerik just able to detect the container of the selections but no the individual selections. (Cointaner.PNG)

I tried using coded step based on the DOM but still unable to detect the particular selection and the assert fails. As the element is nested in the DOM, i used these codes : 

Element documentSet = Find.ByAttributes("id=ctl00_PlaceHolderMain_ctl00_SelectCandidate", "multiple=multiple" ,"value=0x0120D520002D8D5909BD994D82BE83C7681DC18B2F");

 Assert.IsNotNull(documentSet , "Record not found.");
 ActiveBrowser.Actions.Click(documentSet)

Here's the screen shot of the DOM (DOM1.PNG). As there are two values for "title" parameter, i had to use the "value" parameter. (Tried "title =Business Development CORP Set") but still unable to detect. 

Here's are the tags as per image DOM1.PNG

<select name="ctl00$PlaceHolderMain$ctl00$SelectCandidate" title="Possible values" id="ctl00_PlaceHolderMain_ctl00_SelectCandidate" style="width: 190px; height: 150px; overflow: auto;" ondblclick="GipAddSelectedItems(ctl00_PlaceHolderMain_ctl00_Picker_m); return false" onchange="GipSelectCandidateItems(ctl00_PlaceHolderMain_ctl00_Picker_m);" multiple="multiple">

<option title="Business Development CORP Set" value="0x0120D520002D8D5909BD994D82BE83C7681DC18B2F">Business Development CORP Set</option>

Hope you guys can give some guides :)

Thanks,

Pravin

 

 

 

Vera
Telerik team
 answered on 25 May 2018
5 answers
125 views

Hi , 

I am facing Anti- Forgery issues when performing Load Testing . I am not sure how to handle dynamic values for each sessions per page. 

 

Please find attached screenshot  same.

 

Thanks,

Noorain 

 

 

Elena
Telerik team
 answered on 22 May 2018
Narrow your results
Selected tags
Tags
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?