Telerik Forums
Test Studio Forum
5 answers
326 views

Hello,

I am using Test Studio to test our webpage.  Here's the scenario:

1) The user navigates to an URL

2) Logins and by entering their credentials

3) Selects a menu item from the drop-down menu when the user hovers over a menu item on the top bar menu.

4) A new tab opens up with the specified page in the same browser.

Knowing what I read, you want to avoid testing tabs, so open the specified page in a new window?  Ok, that's fine but how do I get Test Studio to run the scripts in the new browser page?  Should I proceed with or just create tests using tabs?

If that one was easy, how do I check the existence of a specified text in a drop-down menu?  I tried using the recorder and the highlighter but I couldn't get it to work; the drop-down menu would disappear when using the highlighter.

Thank you

Peter

Vera
Telerik team
 answered on 26 Jun 2018
6 answers
104 views

Hi,

we are facing a problem with the jUnit export of the ArtOfTest.Runner, it happens very often that the exported jUnit file is in the wrong format.

Sometimes it looks something like this:

<testsuites xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <testsuite name="XXX" timestamp="2018-06-19T09:14:10Z" hostname="XYZ" tests="8" failures="0" errors="0" time="631.2858114">
    <testcase name="Test1" time="0.4940152" />

     ...(all of the tests)

  </testsuite>
</testsuites></testsuites>>

Or like this:

<testsuites xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <testsuite name="XXX" timestamp="2018-06-18T19:09:09Z" hostname="XYZ" tests="8" failures="1" errors="0" time="679.4595394">
    <testcase name="Test1" time="5.6998895" />

    <testcase name="TestN" time="211.6068644">
        <failure>

            ...The correct failure message...

        </failure>
    </testcase>
  </testsuite>
</testsuites>
</testsuites>

 

Thanks for checking the problem,

Greg

Elena
Telerik team
 answered on 25 Jun 2018
7 answers
221 views

Hi,

we are facing a problem with the ArtOfTest.Runner, after completing the tests the program never quits. The longest duration of the test we ran was two days, which we had to cancel. The error occurs very often. We are using the ArtOfTest.Runner from VSTS, but the failures also occure on the machine itself as seen in the console. The machine with the Test Studio is a VM in Azure that connects on startup via VPN to the right webserver.

The call is "C:\Program Files (x86)\Progress\Test Studio\Bin\ArtOfTest.Runner.exe" list="C:\Users\XXX\Documents\XXX.TelerikTestStudio\TestLists\XYZ.aiilist" persistOnEachStep=true junit settings="C:\Users\XXX\Documents\XXX.TelerikTestStudio\Environment\test.config" also with staging.config which is basically same, but has another URL.

Nothing shows up in the logs.

Note: We are also facing a problem with the jUnit parameter xyz.junit.xml not beeing in right format. I opened another thread for this.

 

Thanks for helping in advance,

Greg

Elena
Telerik team
 answered on 25 Jun 2018
7 answers
201 views
I am trying to locate a number of elements which are structurally related to a known element in the hierarchy; in this case, finding all the td cells in a single column of a table. I am trying to use a FindExpression as recommended in the user guide, but it is failing with an error

InnerException:
System.NotSupportedException: Find.All is currently not supported for expressions that have a hierarchal dependency

My code works like this:

HtmlFindExpression expression = new HtmlFindExpression("tagindex=td:3");
IList<Element> foundelements = tablecontrol.Find.AllByExpression(expression);
Note that the expression I am using is very similar to one of the expressions in the user guide (""tagindex=td:0"").

The code compiles without problems, but at runtime it throws the exception as above. What do I need to do to use a find expression to locate the td elements in this way?

P.S. See attachments for a simple worked example.
Elena
Telerik team
 answered on 18 Jun 2018
4 answers
239 views

Does test studio have some feature to achieve this: use test case like a function, create step with custom input parameter.

I know data source can somewhat do this, but it is not flexible.

Suppose we want create a scenario, User A login the system, publish a product, User B login to buy the product, User A login the process the order. A and B can vary from time to time.

Can we easily achieve this by assembling steps?

Elena
Telerik team
 answered on 18 Jun 2018
7 answers
184 views
Hello,
I am just trying out testStudio and created a simple record and playback in which I created a new user account using some our internal website. This test would fail next time because we would throw a 'duplicate account' error. Is there a way to have some kind of teardown/cleanup after a each test case ends in these simple record and playback tests ? What about other more advanced tests ?
Elena
Telerik team
 answered on 18 Jun 2018
15 answers
301 views
I have a folder structure similar to this:
Admin
 - Login
 - Account
    - View project

Where Admin and Account are folders, and Login and View project are tests. The first step in the View Project test is the Login test (using Test as Step). When I move View project to another folder (ie. Misc), I am no longer able to run the View project test, which fails on the first step with the following error:

InnerException:
System.IO.FileNotFoundException: Unable to find test 'C:\path\path\path\Admin\Login.tstest'
   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteTestInCurrentContext(String relativeTestPath)
   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep(Int32 order)

Do I need to redo the Test as Step steps every time I move a test between folders? Why doesn't the application know where it's been moved to automatically?

Edit: When I re-add my Test as Step, it still returns the error about not being able to find it. My folder structure is actually 3 deep at the point of the View project test, and this only occurred after I moved it into a more nested folder.

Vera
Telerik team
 answered on 14 Jun 2018
1 answer
358 views

Hi,

I am trying to verify a particular cell value in a table. I went through similar questions asked in the past to get the solution.

My "Build Succeded", but "step failed"

HtmlTable T1 = ActiveBrowser.Find.ByXPath<HtmlTable>("//*[@id='ProgramGrid']/div[2]/table/tbody");
HtmlTableCell C1 = T1.Find.ByXPath<HtmlTableCell>("//*[@id='ProgramGrid']/div[2]/table/tbody/tr[2]/td[5]");

Assert.IsTrue(C1.TextContent.Equals("Irish Dunlap"));

 

 

 

Elena
Telerik team
 answered on 13 Jun 2018
3 answers
267 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
510 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?