Telerik Forums
Test Studio Forum
1 answer
38 views
I looked for either how to or demo video clips for the new load/stress testing add on...

I'm not seeing them, did I miss them or are they coming?
Thanks
Dan
Anthony
Telerik team
 answered on 12 Apr 2012
2 answers
47 views
Hi,

My situation:
  1. I created a data driven test case and test it independently, as a main test, bound to an Excel data source.
  2. In this test, the data is bound to some list box selection.
  3. Works perfectly and the list boxes are selected according to the data set.
  4. I converted this test case into a sub test to increase usability and maintainability of the test cases
  5. I have enabled the "InheritParentDataSource" check for the test.
  6. I have removed the data binding for the test.
  7. I have created a main test case and bound it to the same set of Excel dataset
  8. I execute the sub test as a test step in the main test.
  9. Now, the list box selected does not follow the dataset anymore.
  10. I checked the sub test again and couldnt see any differences.
  11. I "Customize Test In Code" those listbox selection steps and realize something interesting.

If the sub test is bound to the data set, when i customize the step in code, I see:

Pages.MyPage.MyFrame.MyListBox.SelectByText(CType(System.Convert.ChangeType(Data("MyField"), GetType(String)),String), true)

If the sub test is not bound to the data set, when i customize the step in code, I see:

Pages.MyPage.MyFrame.MyListBox.SelectByText("XXXXX", true)

Is there some other settings I need to set for the sub test to get the result I want? Or is still going to be a future enhancement? If so, what is the temporary workaround you can advice?

Thanks

Teng Geok
Top achievements
Rank 1
 answered on 12 Apr 2012
2 answers
58 views
My test functions correctly in Chrome and IE. The functionality is there in Firefox, however two of my steps include drag and drops.  For some reason Firefox resizes itself upon initialization of the drag portion of the step, which in turn moves the target area and creates a failure in the test.  How do I keep firefox from changing from full screen to smaller pop up size mid test?
Byron
Telerik team
 answered on 11 Apr 2012
2 answers
247 views
Hi,

I am recording a scenario for an intranet application which uses the windows authentication and doesn't have login page. When I record for the regular user role scenario and then separately record for his/her supervisor role, the tests record and execute as expected.
But if I try to record complete scenario into one test of opening the browser with regular user and performing certain actions and then closing the browser to login as supervisor, doesn't work, as TS understands the close of browser as end of test and doesn't take recordings for Supervisor role.
So, I recorded them separately and then copy+pasted them to one single test. Now, executing would not close the browser after first login and fails while trying to key in the credentials of the supervisor.
Hand coding to add  ActiveBrowser.Close(); helped in closing the browser forcibly, but not able to manage how to open the browser for next login.

Any straight settings or work-arounds?

Thanks,
Ravi
Ravi Prakash
Top achievements
Rank 1
 answered on 11 Apr 2012
1 answer
292 views
How could I return some parameter from 1 method and use it as input parameter in another method?

I have 2 methods and need to communicate between them
    [CodedStep("Copy and convert Contact URL")]
    public string Copy_ContactURL()
    {
      // Copy URL of current Contact
      string contactURL = ActiveBrowser.Url.ToString();
 
      // Convert URL     
      var nameValueCollection = HttpUtility.ParseQueryString(contactURL);
 
      string[] paramArray = { "preloadcache", "pagemode", "rof", "extraqs" };
 
      for (int i = 0; i < paramArray.Length; i++)
      {
        nameValueCollection.Remove(paramArray[i]);
      }
      contactURL = HttpUtility.UrlDecode(nameValueCollection.ToString());
 
      return contactURL;
    }
 
......
    [CodedStep("Open Contact")]
    public void OpenContact(string contactURL)
    {
      ActiveBrowser.NavigateTo(contactURL);
    }
Stoich
Telerik team
 answered on 11 Apr 2012
5 answers
131 views
I am following the instructions from this thread to validate a hyperlink exists on a web page of search results, however the object being returned is null.  I do not need to click on the link, just verify that there is one link on the page that contains the string from 'WorkItem'.

Am I using the code correctly or is it not designed to find the string among characters (like Substr or Mid)... :|

Any other tips would be great.  Thanks much!
HtmlAnchor a = ActiveBrowser.Find.ByContent<HtmlAnchor>(Data["WorkItem"].ToString());
if (a != null)
{
    Log.WriteLine("Found - " + a);
}
else
{
    Log.WriteLine("Not found");
}
Alan
Top achievements
Rank 2
 answered on 10 Apr 2012
2 answers
89 views
Hi,

I have an issue with Test Lists. I am running Test Studio version 2011.2.1413.0

I have a script that iterates through 7 rows of data in a data file. When I run the script directly from the Record tab everything works perfectly. When I run the script from a Test List the script fails at the first iteration. There is no error reported from the Test List.

The faiure happens at the first IF...ELSE statement in the script. The IF statement test is:
IF (Verify 'InnerText' 'StartsWith' 'Showing 0' on 'TableUsersInfoDiv') THEN

On the first pass the IF clause should report TRUE, and it does do that when the script is run from the Record window. Below is an extract from the (verbose) log generated by the Test List execution (and please note that all conditions prior to execution through the Reporting screen and the Test List are identical in every instance):

Trace] : Wait for 'InnerText' 'StartsWith' 'User List' on 'HtmlTag'
[Trace] : Click 'AllRadio'
[Trace] : Click:([Element: 'input:3' (id=all)])
[Trace] : Enter text 'test' in 'Text' - DataDriven: [$(UserName)]
[Trace] : SetText:([Element: 'input:1']) - Text:
[Trace] : ScrollToVisible:([Element: 'input:1']) - ElementTopAtWindowTop
[Trace] : MouseClick:LeftDown (1108,454)
[Trace] : MouseClick:LeftUp (1108,454)
[Trace] : MouseClick:LeftClick (1108,454)
[Trace] : IF (Verify 'InnerText' 'StartsWith' 'Showing 0' on 'TableUsersInfoDiv') THEN
[Trace] : Comment: User ID already exists so just logout
[Trace] : Execute test 'g_Logout'
[Trace] : Comment: Script: g_GenericLogout; Author: Nigel Edwards; date: 02/03/12
[Trace] : Execute test 'g_LogoutWaitForButton'
[Trace] : Comment: Script: g_WaitForLogoutButton; Author: Nigel Edwards; date: 02/03/12

The COMMENT line reported above is actually within the ELSE clause. This shows that a swathe of code (over 30 lines) within the IF statement is not being executed when run from the Test List. In fact the 'InnerText' does start with 'Showing 0'. I've attached the full test script to this posting, but in brief, what should happen after the IF test is a further verification line immediately followed by a button-click. Instead the Test List version skips to the ELSE clause, which is a Logout command.
As I say, the script functions 100% correctly when run directly from the Record window.

A little bit more information for you, here is the .aiilist file from the last time I tried to execute my script through a Test List:

< TestList Type="ArtOfTest.WebAii.Design.Execution.TestList" Version="2011.2.1413.0">
<ID Type="System.String">2ac18a53-d0af-4a41-8ed9-d9dee6f17704</ID>
<TestListName Type="System.String">temp list</TestListName>
<Date Type="System.DateTime">2012-03-26 12:38:16Z</Date>
<Settings Type="ArtOfTest.WebAii.Core.Settings" Version="2011.2.1413.0">
<WebSettings Type="ArtOfTest.WebAii.Core.Settings+WebSettings" Version="2011.2.1413.0">
<DefaultBrowser Type="ArtOfTest.WebAii.Core.BrowserType">InternetExplorer</DefaultBrowser>
<WebAppPhysicalPath Type="System.String">
</WebAppPhysicalPath>
<EnableScriptLogging Type="System.Boolean">True</EnableScriptLogging>
<EnableUILessRequestViewing Type="System.Boolean">False</EnableUILessRequestViewing>
<LocalWebServer Type="ArtOfTest.WebAii.Core.LocalWebServerType">None</LocalWebServer>
<BaseUrl Type="System.String">
</BaseUrl>
<AspNetDevServerPort Type="System.Int32">-1</AspNetDevServerPort>
<KillBrowserProcessOnClose Type="System.Boolean">False</KillBrowserProcessOnClose>
<RecycleBrowser Type="System.Boolean">True</RecycleBrowser>
<UseHttpProxy Type="System.Boolean">False</UseHttpProxy>
<EnableSilverlight Type="System.Boolean">False</EnableSilverlight>
<VerboseHttpProxy Type="System.Boolean">False</VerboseHttpProxy>
<SilverlightConnectTimeout Type="System.Int32">30000</SilverlightConnectTimeout>
<MultiBrowsersExecution />
<UseMultiBrowsers Type="System.Boolean">False</UseMultiBrowsers>
<IsProfilingExecution Type="System.Boolean">False</IsProfilingExecution>
<ProfilerConfigurations />
</WebSettings>
<WpfSettings Type="ArtOfTest.WebAii.Core.Settings+WpfSettings" Version="2011.2.1413.0" />
<ClientReadyTimeout Type="System.Int32">30000</ClientReadyTimeout>
<ExecuteCommandTimeout Type="System.Int32">20000</ExecuteCommandTimeout>
<LogLocation Type="System.String">C:\WebAiiLog\</LogLocation>
<QueryEventLogErrorsOnExit Type="System.Boolean">False</QueryEventLogErrorsOnExit>
<ExecutionDelay Type="System.Int32">0</ExecutionDelay>
<AnnotateExecution Type="System.Boolean">True</AnnotateExecution>
<SimulatedMouseMoveSpeed Type="System.Single">0.3</SimulatedMouseMoveSpeed>
<WaitCheckInterval Type="System.Int32">500</WaitCheckInterval>
<AnnotationMode Type="ArtOfTest.WebAii.Core.AnnotationMode">All</AnnotationMode>
<LogAnnotations Type="System.Boolean">True</LogAnnotations>
<IsStressRecordingMode Type="System.Boolean">False</IsStressRecordingMode>
<IsUserInteractiveMode Type="System.Boolean">False</IsUserInteractiveMode>
<CreateLogFile Type="System.Boolean">True</CreateLogFile>
<XMultiMgr Type="System.Boolean">True</XMultiMgr>
<UnexpectedDialogAction Type="ArtOfTest.WebAii.Core.UnexpectedDialogAction">HandleAndFailTest</UnexpectedDialogAction>
<ElementWaitTimeout Type="System.Int32">10000</ElementWaitTimeout>
<DisableDialogMonitoring Type="System.Boolean">False</DisableDialogMonitoring>
</Settings>
<Tests>
<Item Type="ArtOfTest.WebAii.Design.Execution.TestInfo" Version="2011.2.1413.0">
<ID Type="System.String">a4ece2e6-629e-4997-b575-5abf386e7ed7</ID>
<Path Type="System.String">SystemAdmin\Users\sa_UsersSetupAllRequired.tstest</Path>
</Item>
</Tests>
<Filter Type="ArtOfTest.WebAii.Design.Execution.Filter" Version="2011.2.1413.0">
<Keys />
<Comparisons />
<Values />
</Filter>
<TestListType Type="ArtOfTest.WebAii.Design.TestListType">Automated</TestListType>
< /TestList>

...also, I have created a stripped down script that also fails in exactly the same way, so it is not just one script. Here's the Test List execution log:

[Trace] : Execute test 'g_NavigateToURL'
[Trace] : Comment: Script: g_NavigateToURL; Author: Nigel Edwards; Date: 02/03/12
[Trace] : Comment: To consistently navigate to the URL and open the LogOn screen
[Trace] : Comment: Script uses Local Data
[Trace] : Navigate to Project - DataDriven: [$(URL)]
[Trace] : NavigateTo: http://vs-demo/BaseProjectQA
[Trace] : Wait for 'InnerText' 'StartsWith' 'Base Project - Log On' on 'HtmlTag' - DataDriven: [$(LogonScreenTitle)]
[Trace] : Extract 'TextContent' on 'VersionTagDiv' into DataBindVariable $(VersionNumber)
[Trace] : *** Version Number is: v 1.9.0.11 ***
[Trace] : Comment: * End of g_NavigateToURL test script *
[Trace] : Enter text 'user' in 'TextBoxUserIdText'
[Trace] : SetText:([Element: 'input:0' (id=textBoxUserId)]) - Text:user
[Trace] : Enter text 'password' in 'PasswordPassword'
[Trace] : SetText:([Element: 'input:1' (id=Password)]) - Text:password
[Trace] : Click 'ButtonLogOnSubmit'
[Trace] : Click:([Element: 'input:2' (id=ButtonLogOn)])
[Trace] : Click 'SystemAdminLinkLink'
[Trace] : Click:([Element: 'a:7' (id=SystemAdminLink)])
[Trace] : Click 'UsersSpan'
[Trace] : Click:([Element: 'span:34'])
[Trace] : Wait for Exists 'CreateNewSpan'
[Trace] : Enter text 'abc' in 'Text'
[Trace] : SetText:([Element: 'input:1']) - Text:
[Trace] : ScrollToVisible:([Element: 'input:1']) - ElementTopAtWindowTop
[Trace] : MouseClick:LeftDown (1083,394)
[Trace] : MouseClick:LeftUp (1083,394)
[Trace] : MouseClick:LeftClick (1083,394)
[Trace] : IF (Verify 'InnerText' 'StartsWith' 'Showing 0' on 'TableUsersInfoDiv') THEN
[Trace] : Comment: else do nothing
[Trace] : Closing Window


Thanks,
Nigel Edwards, Transition Computing.

PS - this thread was originally posted as http://www.telerik.com/automated-testing-tools/community/forums/test-studio/general-discussions/test-list-skips-over-execution-code.aspx, but it failed to be searchable, so is reposted here.
Nigel
Top achievements
Rank 2
 answered on 10 Apr 2012
4 answers
85 views
Hi,

Yesterday I posted "Test List 'skips over' execution code" to the forum.  The link is:
http://www.telerik.com/automated-testing-tools/community/forums/test-studio/general-discussions/test-list-skips-over-execution-code.aspx

If I search for 'nigel edwards' all my posts except the above are found.  Why not this one?

I can click on the link and find the post, but searching for the post doesn't locate it.  Any ideas?

Thanks,
Nigel Edwards, Transition Computing
Nigel
Top achievements
Rank 2
 answered on 10 Apr 2012
5 answers
39 views
I have following object on my page:
http://screencast.com/t/z66xIoROx
If I run test with step "click" this object and "Toggle Annotation" is on - test performs successfully.
If "Toggle Annotation" is off - click on this object works incorrectly - adjacent button is clicked and test failed.
Ivaylo
Telerik team
 answered on 09 Apr 2012
1 answer
148 views
I want to extract some coded steps from my test to use it by different tests. These coded steps work with variables defined in test and these variables are different in different test.
// define variable
public static string accountEmailDomain = DateTime.Now.ToString("yyMMddHHmmss") + ".com";
 
 
// use it in code
[CodedStep("Enter text in 'Account_EmailDomain'")]
public void Fill_AccountEmailDomain1()
{
  Pages.AccountWindow.FrameContentIFrame.Account_Emaildomain.MouseClick();
  Manager.Desktop.KeyBoard.TypeText(accountEmailDomain, 50, 100);
}
I want to extract CodedStep to separate test, but how I could pass variable 'accountEmailDomain' from current running test?
I only guess to do it like
// use it in separate test
[CodedStep("Enter text in 'Account_EmailDomain'")]
public void Fill_AccountEmailDomain1()
{
  Pages.AccountWindow.FrameContentIFrame.Account_Emaildomain.MouseClick();
  Manager.Desktop.KeyBoard.TypeText(Test1.accountEmailDomain, 50, 100);
}
but I need to pass testname to this separate test.

Please suggest.
Stoich
Telerik team
 answered on 06 Apr 2012
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?