Telerik Forums
Test Studio Forum
2 answers
161 views

Hello,

I am using Test Studio to develop automated tests for a complex WPF application.

I am wondering: Is there any API calls I can make in a coded step that allows me to disable specific steps from being run during test execution? 

 

For example:

if (some condition)

{

  disable steps 2-4 of this test

}

else

{

  execute all steps of this test

}

 

I want to have the condition be the value of an environmental variable on the computer where the test will be ran. (Will be ran on multiple different computers with the same environmental variable set to different values).

 

Let me know if there are any methods out there I could use.

 

Thanks,

Jon

Jon
Top achievements
Rank 2
 answered on 04 Oct 2016
3 answers
114 views
We are on version 49.0.1 of Firefox and plug-in are unavailable for Test Studio.  Why?  On an existing test server the plug-in show disabled now, why when they were enabled before. 
Nikolay Petrov
Telerik team
 answered on 04 Oct 2016
23 answers
171 views

Hi,

 

I am creating Global function for Login which can be executed for different user types. I have added UserName & Password input field under required pages which I can see in Elements treeview. Now I am trying to use them in Utility class to input username & password and it is not working. I have added using ProjectName; and tried as per this article but my elements doesn't appear for page. It only shows three properties like Equals, ExpressionDefinitions and ReferenceEqual. 

 

Can some one help me on this ?

 

Thanks,

Chandresh

Elena
Telerik team
 answered on 03 Oct 2016
11 answers
957 views
I have a common tstest class that houses global logic used throughout all my tests.  I'm attempting to call a actionLogin method that runs a Test As Step from another test.  If I call this actionLogin() method from within the common tstest class, OR if I just copy/paste the code into the outside tstest class, the test runs as expected.  If I call this Common.actionLogin() method from outside of this particular common tsttest class, the following error is triggered:

The ExecutionContext is null. Initialize has not been called yet or it failed.

Sample of code from the common tstest class:
public void actionLogin()
{
     //other code
     this.ExecuteTest("Actions\\acLogin.tstest");
     //other code
}

Sample of code from the outside tstest class:
Common.actionLogin();
Boyan Boev
Telerik team
 answered on 03 Oct 2016
3 answers
142 views

Hi Team,

 

I have tried below code but it isn't working

using System.Runtime.Serialization;

 

Log.WriteLine(this.ExecutionContext.Test.Name.ToString());

 

Below is the error i am getting after compiling above code

 

d:\Financials Panel\fgdg.tstest.cs(87,49) : error CS0012: The type 'System.Runtime.Serialization.IExtensibleDataObject' is 
defined in an assembly that is not referenced. 
You must add a reference to assembly 'System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.


d:\Financials Panel\fgdg.tstest.cs(87,49) : error CS0012: The type 'Telerik.TestStudio.Interfaces.Storage.IDataTransport' is 
defined in an assembly that is not referenced. 
You must add a reference to assembly 'Telerik.TestStudio.Interfaces, Version=2016.2.630.0, Culture=neutral, PublicKeyToken=b9f4c4e36181b3de'.

 

Thanks

Abdul

Elena
Telerik team
 answered on 30 Sep 2016
7 answers
85 views

Hello,

I am evaluating this product for one of my clients. Although the record stuff seems to work nice, highlighting does not. On a high-dpi window (Surface Pro, Macbooks, etc), the highlighting is off. It should translate the coordinates based on the DPI settings of the system.

Can you please add support for any dpi?

Boyan Boev
Telerik team
 answered on 30 Sep 2016
1 answer
57 views

Hi,

Our Quality Center config requires a Test ID value when creating a test case. Attempts to sync my Test Studio scripts to QC fails because a Test ID is not defined. Is the mapping to QC configurable? The script's UniqueID or a fixed value would suffice as the required Test ID.

Any suggestions for a workaround? I'd be surprised if I'm the first one to have this issue.

 

Thanks,

Dan

Elena
Telerik team
 answered on 29 Sep 2016
3 answers
121 views

I have multiple tests that all pass successfully when run on Tests and Test Lists tabs within the test studio application, but when set to run at a specific time on the scheduler, they fail at some point in the middle of the test.

Conditions are otherwise the same (I have a windows process set up to make sure that they're even connected to the same router). 

 

Here's an example log from one of the failed tests. These same failed steps pass when I run the test myself without the scheduler. I'm stumped. Anyone run into this or have suggestions on fixing it? 

 

Lance

Overall Result: Fail
------------------------------------------------------------
'9/19/2016 8:10:20 AM' - Executing test: 'Submit Contact Form', path: 'Web\Forms\Contact Form\Submit Contact Form.tstest.'
'9/19/2016 8:10:20 AM' - Using .Net Runtime version: '4.0.30319.42000' for test execution. Build version is '2015.2.723.0'.
'9/19/2016 8:10:20 AM' - Starting execution....
'9/19/2016 8:10:21 AM' - Detected custom code in test. Locating test assembly: Spire Web.dll.
'9/19/2016 8:10:21 AM' - Assembly Found: C:\Users\Asus\Documents\spiredigital-telerik\SpireDigital\bin\Spire Web.dll
'9/19/2016 8:10:21 AM' - Loading code class: 'Spire_Web.Submit_Contact_Form'.
------------------------------------------------------------
------------------------------------------------------------
'9/19/2016 8:10:21 AM' - Using 'InternetExplorer' version '11.0' as default browser. 
'9/19/2016 8:10:21 AM' - Using 'http://spiredigital.com' as base url.
'9/19/2016 8:10:21 AM' - 'Pass' : 1. 'Maximize' the browser.
'9/19/2016 8:10:23 AM' - 'Pass' : 2. Clear Browser Cache
'9/19/2016 8:10:24 AM' - 'Pass' : 3. Navigate to : '/'
'9/19/2016 8:10:25 AM' - 'Pass' : 4. Wait for '500' msec.
'9/19/2016 8:10:25 AM' - 'Pass' : 5. Enter text 'Automated Test Email' in 'NameText'
'9/19/2016 8:10:25 AM' - 'Pass' : 6. Wait for '250' msec.
'9/19/2016 8:10:26 AM' - 'Pass' : 7. [Contact_Form_Submission_CodedStep] : Enter text '' in 'EmailEmail'
'9/19/2016 8:10:26 AM' - 'Pass' : 8. Wait for '250' msec.
'9/19/2016 8:10:26 AM' - 'Pass' : 9. Enter text '3031234567' in 'PhoneText'
'9/19/2016 8:10:27 AM' - 'Pass' : 10. Wait for '250' msec.
'9/19/2016 8:10:27 AM' - 'Pass' : 11. Enter text 'Automated test, please disregard.' in 'MessageTextArea'
'9/19/2016 8:10:27 AM' - 'Pass' : 12. Wait for '500' msec.
'9/19/2016 8:10:27 AM' - 'Pass' : 13. Desktop command: LeftClick on SubmitButtonTag
'9/19/2016 8:10:28 AM' - 'Pass' : 14. Wait for '500' msec.
'9/19/2016 8:10:59 AM' - 'Fail' : 15. Wait for element 'ThankYouH2Tag' 'is' visible.
------------------------------------------------------------
Failure Information: 
~~~~~~~~~~~~~~~
Element is visible verification failed! Expected: True, actual: False.
------------------------------------------------------------
'9/19/2016 8:10:59 AM' - Detected a failure. Step is marked 'ContinueOnFailure=False' aborting test execution.
------------------------------------------------------------
'9/19/2016 8:10:59 AM' - Overall Result: Fail
'9/19/2016 8:10:59 AM' - Duration: [0 min: 37 sec: 97 msec]
------------------------------------------------------------
'9/19/2016 8:10:59 AM' - Test completed!
Elena
Telerik team
 answered on 27 Sep 2016
3 answers
118 views

Hi,

 

The issue I currently have is a little tricky to explain, so feel free to ask for clarification :)

I’m running wpf. tests on an in-house application. Our application uses integrated logins, so usually when I do standard workflows, I let the app login automatically with my personal credentials. However, at times I need to log in as a different user. In daily use we do this by holding down F2 to break the integration and allow manual login.

Previously I could accomplish this during testing by a small coded step with a keyboard.keyUp/Down event. However, this only worked because of an old inherent error in the test application that would cause the initialisation of the application to be halted until a dialogue was accepted, allowing us to insert the keyboard event before full app boot up.

And now we get to the issue at hand: Since I updated to current version of Test Studio and Runtime, that particular error message caused TS to lose focus on start-up and the tests failed because of this. The developers then fixed the error, so the message would not appear and the tests would run alright. BUT, without the error message dialogue, the initialisation of the application is not paused by anything, and the keypress event doesn’t happen at the critical point. Thus, I never get the login box and am not able to proceed with these particular tests.

So, based on this, can you think of a way to introduce the F2 key event at the moment of initialisation? Or alternatively, is there a way to pass arguments to execute the application so we can program a different start-up behaviour depending on the test?

 

Thank you,

Jakob

Elena
Telerik team
 answered on 26 Sep 2016
8 answers
95 views
When using the quick steps menu, the only option for verifying the RadGridView row count is choosing Equal to the current row count. When creating this step in the previous version, I was able to modify the step to 'GreaterThan' after adding it. Since upgrading to 2016.2 the Comparison type input is grayed out. I also tried changing the RunsAgainstVersionCompare dropdown but it doesn't seem to do anything.
Jennifer
Top achievements
Rank 1
 answered on 23 Sep 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?