Telerik Forums
Test Studio Forum
13 answers
174 views
Hi,

i am working on a WPF application.
    // Click on GeotechOrangeRadiobutton
     
    if(Data["Geotech (Orange)"].ToString()=="True") Applications.UIWPFexe.AddAlarmPopup.GeotechOrangeRadiobutton.Check(true);
    else
    {
                    Log.WriteLine("Geotech (Orange) is False");
    }
}

I got a previous discussion post on how to data drive the radio button and I have updated my test like wise. But when i added the details required for the already existing data driving file (.csv), those are not getting reflected in the test studio. I tried the 'Refresh ' button in test studio also, still it is not showing the added columns. Could you please let me know, what needs to be done to fix this. Do I need to create a new data file and bind it?Also how can I remove an already bound file from a test step?

I have attached the screen shot of my tests. The data binding options are not coming for my coded step, which can be seen in the attached screen shot. The 'property' and 'value' are coming blank.

Also, can we compare the dynamically generated image from the application to a stored image?

Thanks,
Anju
Plamen Mitrev
Telerik team
 answered on 19 Sep 2019
4 answers
109 views

Hi. I am wondering if there is a limit to the UseStepWaitOnElementsTimeout?

I am trying to wait for a text content while importing a file.The attached image is the recorded steps.

Normally this file import will take less than 30 mins but I do not want to delay execution for a fixed duration.

What I am trying to do here is that I want to wait until text content "Completed with skipped records" appears then proceed with further verification.

But it seems like Test Studio did not wait for timeout until 1,800,000ms. Another attached image is the execution log.

Do I use WaitOnElements correctly in this case?

Yan Jun
Top achievements
Rank 1
Iron
Veteran
 answered on 19 Sep 2019
12 answers
132 views

Hi,

 

Has anyone come across this issue and if so, have a solution?

 

I have an excel spreadsheet containing rows of currency data, when I bind said spreadsheet to a test and then set a variable (column from the spreadsheet) to use in a verification step, I then check the values being pulled back in the binding pop up. It is stripping out the comma from the values of => 1,000. My verification step then fails when I run the test as the webpage is supplying the string of 'Total = £1,389.39' and the expected value is set to contain '1389.39'. Any idea how to stop Test Studio pulling out the wrongly formatted value from excel for the expected string? Excel has the value set in the cell to 1,389.39 so why isn't Test Studio pulling this value out? If it did, then the test would correctly pass!

Thanks in advance for any help/insights.

 

Kerry

Plamen Mitrev
Telerik team
 answered on 18 Sep 2019
25 answers
322 views

Hello,

 

I have setup smtp email configuration on schedule server and selected option to send email while scheduling test execution.

Test executes just fine but not receiving email. Email smtp config and log file attached.

I also need to send test results via email when test is run through .bat file

my bat file

Title Test Runner
IF EXIST "C:\Program Files (x86)\Progress\Test Studio\Bin" goto :a
echo not found
pause
exit
:a
setlocal
path=C:\Program Files (x86)\Telerik\Test Studio\Bin;%path%
call ArtOfTest.Runner.exe list="C:\..\TestLists\Remote Execution Test.aiilist" serverPublish=true notifyOption=1 mails=myemail@abc.org

 

Thanks

-

Padmashree

 

 


 

 

 

 

 

Padmashree
Top achievements
Rank 1
 answered on 12 Sep 2019
0 answers
73 views

Perhaps. We will see.

I see many questions about parameterization when running test lists on the forums and they all answer one thing: "BaseURL". But I want to parameterize on several other criteria. Can I? I cannot see a way to do it. Always the answer seems to be that we should use BaseURL. We have 3 custom properties in a Test. But how many in Test List? None.

So, what to do?

Well, Telerik is telling us to use the BaseURL.

A solution is this, I use one test step for all my logins. I need to connect to http://foobar.com

My tests have:

         BaseURL = "http://foobar.com"

and my test lists have this and I now have three custom settings in my Test List, or however many I want.

         BaseURL = "http://foobar.com/ray_x=thing1,ray_y=thing2,ray_z=whatever".

And now, with the code below, I see this in my log when I am running from the test:

'9/9/2019 4:02:24 PM' - Using 'https://foobar.com' as base url.
'9/9/2019 4:02:24 PM' - LOG: p size = 3
'9/9/2019 4:02:24 PM' - LOG: p[0]: "https:"
'9/9/2019 4:02:24 PM' - LOG: p[1]: ""
'9/9/2019 4:02:24 PM' - LOG: p[2]: "foobar.com"
'9/9/2019 4:02:24 PM' - LOG: q size = 1
'9/9/2019 4:02:24 PM' - LOG: realUrl: "https://foobar.com"
'9/9/2019 4:02:24 PM' - LOG: paramstr: ""

And I see this in my log when I am running from my test list:

'9/9/2019 4:01:48 PM' - Using 'http://foobar.com/ray_x=thing1,ray_y=thing2,ray_z=whatever' as base url.
'9/9/2019 4:01:48 PM' - LOG: p size = 3
'9/9/2019 4:01:48 PM' - LOG: p[0]: "http:"
'9/9/2019 4:01:48 PM' - LOG: p[1]: ""
'9/9/2019 4:01:48 PM' - LOG: p[2]: "foobar.com/ray_x=100,ray_y=200"
'9/9/2019 4:01:48 PM' - LOG: q size = 2
'9/9/2019 4:01:48 PM' - LOG: realUrl: "https://foobar.com"
'9/9/2019 4:01:48 PM' - LOG: paramstr: "ray_x=thing1,ray_y=thing2,ray_z=whatever"

And the test and the test list work the same.

If I have paramStr, I split it up by commas and I am done.

And I used the BaseURL and nothing else. :--)

cheers - ray

 

        [CodedStep(@"Navigate to : 'http://foobar.com'")]
        public void MinimalLogin_CodedStep1()
        {
            String baseUrl = ActiveBrowser.Manager.Settings.Web.BaseUrl.ToString();

            String[] sep = { "/" };

            String[] p = baseUrl.Split(sep, 3, StringSplitOptions.None);
            Log.WriteLine("p size = " + p.Length);

            Log.WriteLine("p[0]: \"" + p[0] + "\"");
            Log.WriteLine("p[1]: \"" + p[1] + "\"");
            Log.WriteLine("p[2]: \"" + p[2] + "\"");

            String[] q = p[2].Split(sep, 2, StringSplitOptions.None);
            Log.WriteLine("q size = " + q.Length);

            String realUrl;
            String paramStr;

            if (q.Length == 1) {
                realUrl = p[0] + "//" + p[2];
                paramStr = "";
            }
            else {
                realUrl = p[0] + "//" + q[0];
                paramStr = q[1];
            }
            Log.WriteLine("realUrl: \"" + realUrl + "\""); 
            Log.WriteLine("paramstr: \"" + paramStr + "\"");

            ActiveBrowser.NavigateTo(realUrl + "admin.cgi", true);
         }

}

 

ps:So, why do I need to do the split twice? If I knew the insides of th URL structure, I would know. But it works. Done and done.

 

Ray
Top achievements
Rank 1
 asked on 09 Sep 2019
3 answers
63 views

Hello

 

I'm trying to call a test from another test in Mobile Test Studio.  The only indicated way is through a coded step.  Below is the code inside the test method.  The test returns a -1 exit code.

I have called the separate test from the command line directly so know it's possible to call a test, but not sure if this is capable in Mobile Test Studio.

//Code Start
 // initialize new system process
        Process runFooTest = new Process();
        // define the process name to be started
        runFooTest.StartInfo.FileName = @"C:\Program Files (x86)\Progress\Test Studio\Bin\MobileStudio\Telerik.MobileTesting.Runner.exe";

        // set the arguments
        runFooTest.StartInfo.Arguments = @"/msgServer=ws://localhost:8083 /project=C:\MobileAutomation\Mobile /test=Successful_Connection_iOS_App";

        // run the process
        runFooTest.Start();

        // wait until the test return an exit code
        runFooTest.WaitForExit();

        // get the exit code from the executed process 
        int exitCode = runFooTest.ExitCode;

//Log.WriteLine(exitCode.ToString());

        // check if this test step pass or fail. If return 0 - process complete normally, else - process fould.
        Assert.AreEqual(exitCode, 0);

Elena
Telerik team
 answered on 09 Sep 2019
13 answers
329 views
I'm looking at the workflow between developer, tester and CI server to come up with an approach for maintaining environmental specific settings (local dev box, dev/test environment, qa environment, production) such as:

  • Base URL
  • Username / Password by Actor / Role
  • Key Data Values 

I'm wondering how others are tackling this issue?  I see a number of disconnected techniques such as the VS test settings file, data sources, and test list settings.  There seems to be a lack of a universal "project file" across the tool sets which doesn't help either.  What I would like to be able to do is:

  • Developer - selects a "settings/parameters file" in Test Studio Express with environment parameters
  • Tester - selects a "settings/parameters file" in Test Studio Standalone with environment parameters
  • Build - execute runner with a specific "settings/parameters file" that contains environment parameters

Within the test then I can say "Navigate to {BaseUrl}/Reports", "Login as {Regular User}", etc... Without having to have three different types of files per environment what is the best strategy for managing this type of information?

UPDATE: I've added an item to the feedback portal to capture this gap in functionality.
Nikolai
Telerik team
 answered on 06 Sep 2019
1 answer
80 views

Since updating to the newest version, my IF statements are now failing. I need to check the state of an application in a table and the table cells ID changes according to the current state the application is in.  As a result I am using an If/Else statement such as "IF(Wait for Exists 'exampleCell0')" {steps if true}  "ELSE" {steps if false}.  Before this worked fine; when the cell had the same ID as I was looking for it would execute my IF steps and if it did not have the same ID it would execute my else Statement. Now I get this

 

'9/4/2019 10:04:02 AM' - 'Pass' : 7. Click 'SearchButtonTag'
'9/4/2019 10:04:04 AM' - 'Pass' : 8. Wait for '1500' msec.
'9/4/2019 10:04:34 AM' - 'Fail' : 9. IF (Wait for Exists 'ExampleCell0')
'9/4/2019 10:04:34 AM' - Unable to determine logical branch to go into. Unable to execute verification.
------------------------------------------------------------
Failure Information: 
~~~~~~~~~~~~~~~
Object reference not set to an instance of an object.
InnerException:
System.NullReferenceException: Object reference not set to an instance of an object.
   at ArtOfTest.WebAii.Design.IntrinsicTranslators.Descriptors.ExistsVerificationDescriptor.PerformWait(IAutomationHost host)
   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep(Int32 order)
------------------------------------------------------------
'9/4/2019 10:04:34 AM' - Detected a failure. Step is marked 'ContinueOnFailure=False' aborting test execution.
------------------------------------------------------------
'9/4/2019 10:04:34 AM' - Overall Result: Fail
'9/4/2019 10:04:34 AM' - Duration: [1 min: 6 sec: 121 msec]
------------------------------------------------------------

<<< Test-as-Step 'Example Tests\Misc Tests\Review Steps\OpenRecentApplicant.tstest' log ends.

 

I know this is not an issue with my environment as I was able to successfully run this test on another machine running 2019.2.619 using all of the same parameters after I failed on the latest update.

Plamen Mitrev
Telerik team
 answered on 05 Sep 2019
8 answers
106 views
Hi,

I am testing a site that has 21 major pages (modules) some of which contain embedded pages (modules).

I’m in the process of refactoring my large tests.  I’ve broken out steps that are common to each test into their own test file (e.g., environment setup, sign-in, etc.).
I’ve also broken up each primary module into its own separate test file which, along with the common tests, I’m treating as separate functions.
I then use each of these tests to create unique tests using “Test as Step” in the Step Builder.

Thus far, I have been successful in getting this to work for some of my tests.
The problem I’m having is that when a test (function) does fail (e.g., Page 8), I can’t set a breakpoint or “Run to Here” command on that file because only the selected page is executed (i.e., none of the common setup tests that are required to get to the page 8 test are executed).

I’m stuck and wonder if missing a key step, or whether there’s a better approach to handling this type of work.

Any suggestions or help would be greatly appreciated.

Thanks,
Dan 
Elena
Telerik team
 answered on 23 Aug 2019
10 answers
447 views
So my load tests work perfectly now which is great;-) However I`d like to ask you one more thing regarding load testing. Not sure whether to open a new ticket or not. If needed, I`ll do so afterwards. 

If my understanding is correct load testing should represent simulating of more users trying to execute the same test. I know it`s just basic explanation. I`ve read the article connected to data driving of load tests - http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/load-testing/designing-load-tests/load-modifying/load-data-driving.aspx. To be honest I don`t know exactly what`s this for. Here is a sample. 

I have a login test where user is logged into an application. If I want to simulate more users logging in at the same time I can do it using load test. I also know I can data drive performance tests so it`s executed one by one depending on users in external file (e.g. SQL db). If I capture my login test in load test settings I can then set number of virtual users (we have only trial pack for 20 users). If I data drive it what`s this for? Does that mean that e.g. if I have 5 different users in my external file and 20 virtual users set that every virtual user will log in 5 times using a different username from the external file? What`s the main difference between load tests without data driving or with data driving?

I hope the explanation is somehow clear;-) I want to be sure I understand this correctly. 

Thank you. 

Petr
Elena
Telerik team
 answered on 23 Aug 2019
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?