Telerik Forums
Test Studio Forum
1 answer
88 views
Hi I am a new one here and tried using Test Studio to record a basic test case for my Web application.

Test Case

1. Launch Web site
2. Enter credentials
3. Perform search in the system using Criteria1
4. Out of results returned click on ResultRecord  X
5. Check if it loads
6. End

Now I was able to record the scenario and playback as well. My question is that the idea behind this tool is for re using the existing  already recorded scenario. So in my case lets say I ask another person to use my scenario and perform the testing. When he does that I dont want him to open the same Result X which I did, rather he should try doing this for Result Y, Z etc. How and where do I set that

Or in other words how do I test say 10 ResultRecord using the scenario I recorded, without me having to change <Step 4> everytime?

I apologize if its a basic question or If I am not expressing my need clearly. Any insight will be appreciated.
Anthony
Telerik team
 answered on 12 Jun 2012
1 answer
104 views
Part of my testing is to connect to a VM and locate a folder, copy it to the desk top and run the install .exe, Test Studio is installed on my own machine, currently this part of the process is all manual, is there the ability in Test Studio to record and execute this process?
Cody
Telerik team
 answered on 12 Jun 2012
1 answer
88 views

I'd like to make some suggestions to make the image verification feature better - this is for a WPF test but is likely applicable to webpages.

When the image verification fails, it would be helpful to get better feedback. All I see is that it failed and by what percentage.
I need to know where it failed - what position on the image did it fail at? At least give me an x, y coordinate of the general area of the failure.
I've been getting a lot of failures even for simple tests - and I don't know why. I don't think I should have to adjust the tolerance from the default for these simple tests.

Secondly, when I set up a new image verification, I understand I can either compare the whole image or a sub-selection of the image.
What I want to do is do a whole image verification, but I want to mark off regions that I don't care about. For instance, my image may have a clock in the corner - and something actively moving in another area - in that case I would want to exclude both those regions.

Lastly, I'd like to be able to have the option to have the test runner save an image some place when it's verification fails so I can look at it.

Thank You
Stoich
Telerik team
 answered on 12 Jun 2012
2 answers
73 views
Hi,

I was wondering if it was possible to see the code for an entire test in Test Studio the QA edition? I need the coded script to use for Acceptance tests we are using with Specflow. Is this possible?(I have copied and pasted a test to a new folder and clicked view class that is not the coded steps. Rather a coding template with an example.)
Jean-François VIGNERON
Top achievements
Rank 1
 answered on 08 Jun 2012
20 answers
556 views
I am trying to use a reference to a third-party dll in my project and am not having any luck.

As background, the "third-party" dll is actually something I built but I want to use the dll as a common method library. For example, this dll allows me to authenticate a user for my web application without having to enter username and password on the log in page. I want to reference the dll as if it were a common library.

I am using the Test Studio Visual Studio plug-in, NOT the stand alone version.

I was able to make the reference easy enough and my runs perfectly in my local dev environment. When I move my code to my build (in this case CruiseControl) environment, the referred dll cannot b

e found. The .tstest file is looking for the dll in the project folder with the same directory structure as my local dev environment (e.g. c:\users\...). We put all of our CruiseControl files on an E: drive in the build environment. So the third-party dll location on the build environment is NEVER "c:\users..." but rather "e:\cruisecontrol\automation...".

All of our other projects, by the way, do call other referred perfectly fine.

I have tried a number of steps to get around this issue but need more help. I have tried:
1. Removing the references from the .tstest file. I opened the offending .tstest file in an XML view and removed the "hard-coded" lines from the CurrentReferences section. For example, I removed:
<d2p1:string>C:\Users\David Adams\Documents\Visual Studio 2010\Projects\vergeautomationtools\vergeautomationtools\bin\Debug\vergeautomationtools.dll</d2p1:string>
from
    <d2p1:string>System</d2p1:string>
    <d2p1:string>System.Core</d2p1:string>
    <d2p1:string>ArtOfTest.WebAii, Version=2011.2.1506.0, Culture=neutral, PublicKeyToken=4fd5f65be123776c</d2p1:string>
    <d2p1:string>ArtOfTest.WebAii.Design, Version=2011.2.1506.0, Culture=neutral, PublicKeyToken=4fc62bbc3827ab1d</d2p1:string>
    <d2p1:string>Telerik.WebAii.Controls.Html, Version=2011.2.1506.0, Culture=neutral, PublicKeyToken=528163f3e645de45</d2p1:string>
    <d2p1:string>Telerik.WebAii.Controls.Xaml, Version=2011.2.1506.0, Culture=neutral, PublicKeyToken=528163f3e645de45</d2p1:string>
    <d2p1:string>Telerik.WebAii.Controls.Xaml.Wpf, Version=2011.2.1506.0, Culture=neutral, PublicKeyToken=528163f3e645de45</d2p1:string>
    <d2p1:string>System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</d2p1:string>
  :
  :
  :
    <d2p1:string>C:\Users\David Adams\Documents\Visual Studio 2010\Projects\vergeautomationtools\vergeautomationtools\bin\Debug\vergeautomationtools.dll</d2p1:string>
</CurrentReferences>

I also removed numerous, similar references from Settings.aiis. Settings.aiis appears to keep old versions of references around for whatever reason even after I have explicitly removed the reference to a dll.

Something I have noticed is that Visual Studio (or Telerik or whomever) is adding the bad and old versions of the dll references when editing the .tstest file using the "Run To Here" functionality. I use that feature A LOT and now need to edit the XML every time I use the feature. PLEASE NOTE: THE REFERENCES ARE NOT RE-ADDED EVERY TIME "RUN TO HERE" IS USED MAKING IDENTIFICATION OF THE ISSUE THAT MUCH MORE DIFFICULT.

2. I have added a hard-coded reference in my build environment to this dll. I created the path and file "C:\Users\David Adams\Documents\Visual Studio 2010\Projects\vergeautomationtools\vergeautomationtools\bin\Debug\vergeautomationtools.dll"
on the build server. I have come to find that there are security issues with that and that path still cannot be found when executing my test on the build server.
I find this to be a very weak solution to what should not even be an issue.

3. I have changed the entire structure of my solution to include the dll project and my automation project together and make a project reference. Visual Studio still makes an absolute-path reference to the dll so there is, in essence, no difference than making a regular file reference.

4. I have tried to strongly-name the third-party dll and added it to the GAC. Even when adding from the GAC the directory path that appears in Visual Studio is "c:\users...".  This is another weak solution.

5. I created c:\automationdlls and added my dll to this folder. To avoid the c:\user.. security issue I created c:\automationdlls on both my local dev environment and the cruisecontrol environment. When adding a reference to the dll, the directory path that appears in Visual Studio is "c:\users...". Back to square 1.

Of the hundreds of Telerik customers reading these forums, I have to believe that one of you are referencing third-party dlls and building that code in a cruisecontrol environment that is not running off the c: volume. Can anyone assist on this? 

Cody
Telerik team
 answered on 08 Jun 2012
1 answer
72 views

 Hi,

  I got the following error in the failure log:

"

Failure Information: ~~~~~~~~~~~~~~~
Timed out waiting '25000' msec. for download dialog to be handled.
InnerException:System.TimeoutException: Timed out waiting '25000' msec. for download dialog to be handled. at ArtOfTest.WebAii.Design.IntrinsicTranslators.Descriptors.DownloadDialogHandlerDescriptor.Execute(Browser browser) at ArtOfTest.WebAii.Design.IntrinsicTranslators.Descriptors.DialogHandlerDescriptor.Execute(IAutomationHost browser) at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep(Int32 order)------------------------------------------------------------'6/5/2012 1:05:26 PM' - Detected a failure. Step is marked 'ContinueOnFailure=False' aborting test execution.------------------------------------------------------------'6/5/2012 1:05:26 PM' - Overall Result: Fail'6/5/2012 1:05:26 PM' - Duration: [2 min: 17 sec: 274 msec]------------------------------------------------------------'6/5/2012 1:05:35 PM' - Test completed!

"

Actually, i tried "Handle "Download" dialogue" for "File Download" window.,I gave the "Handle button" as "Save" and mentioned the path in the "DownloadPath" section.

Kindly help me with this.

Thanks,
Deepa
Byron
Telerik team
 answered on 07 Jun 2012
1 answer
138 views

Hi Telerik Team,

 

In one of my test, I want to wait till the button gets disabled. So I am using the step as:

‘Wait for ‘btnSave’ is disabed’ and I have set the Wait timeout for the step to ‘120000’.

But surprisingly the step is failing without waiting for 2 minutes. Below is log extract for the failure.

 

I am expecting that if the button is enabled, the “Wait for 'btnSave' is disabled” step will wait till button gets disabled or till max Wait timeout which I have set to 2 minutes. Please let me know if I am using it correctly or do I need to modify the code.

 

Note: I have attached a screenshot for the step properties.

 

Thanks.

 

Log Extract:

 

'6/7/2012 2:26:22 PM' - 'Pass' : 24. Wait for ExistsNot 'Table'

‘6/7/2012 2:28:23 PM' - 'Fail' : 25. Wait for 'btnSave' is disabled

------------------------------------------------------------

Failure Information:

~~~~~~~~~~~~~~~

Element enabled state didn't match expected value. Expected: False Actual: True

------------------------------------------------------------

'6/7/2012 2:28:23 PM' - Detected a failure. Step is marked 'ContinueOnFailure=False' aborting test execution.

------------------------------------------------------------

'6/7/2012 2:28:23 PM' - Overall Result: Fail

'6/7/2012 2:28:23 PM' - Duration: [2 min: 40 sec: 343 msec]

------------------------------------------------------------

------------------------------------------------------------

'6/7/2012 2:28:23 PM' - Overall Result: Fail

'6/7/2012 2:28:23 PM' - Duration: [2 min: 40 sec: 343 msec]

Anthony
Telerik team
 answered on 07 Jun 2012
1 answer
96 views
I want to verify in a step, that the forgroundcolor in a silverlight application textblock is orange.
I cannot find the Property color or similar to this in the verify box.

How can I access the color of a textblock in Silverlight via Teststudio or via code?

Best regards,
Adriane
Anthony
Telerik team
 answered on 06 Jun 2012
2 answers
157 views
Hi,

I am having trouble understanding how Assert() works.  Essentially, the below VB subroutine attempts to find out if an HTML table is displaying a particular table cell after entering a search string into an interactive search field (the search occurs automatically without needing to press a [Go] button).  If the table cell is not present then the routine presses a screen button [Add].  If it is present then the routine clears the search field ready for a new search.

Public Sub sa_SetupLookups_SetLookupTextItems()
    Dim row As Integer
    Dim col As Integer
    Dim minCol As Integer = 3   'First column for lookupText values, column C
    Dim maxCol As Integer = 11  'Last column for lookupText values, column K
    Dim input As String = "C:\Users\edwardni\Documents\Test Studio Projects\Accelerate\Data\AccelerateData.xlsx"
    Dim app As New Microsoft.Office.Interop.Excel.Application()
    'Dim inputBook As Microsoft.Office.Interop.Excel.Workbook = app.Workbooks.Open(input, 0, False, 5, "", "", False, Microsoft.Office.Interop.Excel.XlPlatform.xlWindows, "", True, False, 0, True, False, False) 'This is write
                                                                                         'Object UpdateLinks, Object ReadOnly, Object Format, Object Password, Object WriteResPassword, Object IgnoreReadOnlyRecommended, Object Origin, Object Delimiter, Object Editable, Object Notify, Object Converter, Object AddToMru, Object Local, Object CorruptLoad)
    Dim inputBook As Microsoft.Office.Interop.Excel.Workbook = app.Workbooks.Open(input, 0, True, 5, "", "", False, Microsoft.Office.Interop.Excel.XlPlatform.xlWindows, "", True, False, 0, True, False, False)    'This is read-only
    Dim inputSheet As Microsoft.Office.Interop.Excel.Worksheet = DirectCast((inputBook.Worksheets.Item("Lookups")), Microsoft.Office.Interop.Excel.Worksheet)
    Dim theLookupCode As Object = GetExtractedValue("CodeText")
    Dim lookupCode As String = theLookupCode.ToString().Trim()
    Dim lookupText As String
    Dim NoMatchingTableCell As HtmlTableCell = Pages.LookupEdit.NoMatchingTableCell
 
    Select Case lookupCode
        Case "City"
            row = 2
        Case "CompanyType"
            row = 3
        Case "ContactType"
            row = 4
        Case "DataSourceType"
            row = 5
        Case "DataType"
            row = 6
        Case "IndustryType"
            row = 7
        Case "SalutationType"
            row = 8
        Case "Screen"
            row = 9
        Case "Size"
            row = 10
        Case "CategoryType"
            row = 11
        Case "PriorityType"
            row = 12
        Case "ProjectClientsType"
            row = 13
        Case "SeverityType"
            row = 14
        Case "StatusType"
            row = 15
        Case Else
            row = 999
    End Select
 
    If (row <> 999) Then
        For col = minCol to maxCol
            lookupText = TryCast(DirectCast(inputSheet.Cells(row, col), Microsoft.Office.Interop.Excel.Range).Text, String)
             
            Log.WriteLine("DEBUG LINE theLookupCode: " + theLookupCode.ToString())
            Log.WriteLine("DEBUG LINE lookupCode: " + lookupCode.ToString())
            Log.WriteLine("DEBUG LINE row: " + row.ToString())
            Log.WriteLine("DEBUG LINE col: " + col.ToString())
            Log.WriteLine("DEBUG LINE lookupText: " + lookupText.ToString())
             
            If (lookupText = ".") Then
                Exit For
            Else
                'Search table to see if lookupText already exists
                Pages.LookupEdit.Text.ScrollToVisible(ArtOfTest.WebAii.Core.ScrollToVisibleType.ElementTopAtWindowTop)
                ActiveBrowser.Window.SetFocus
                Pages.LookupEdit.Text.MouseClick
                Manager.Desktop.KeyBoard.TypeText("", 50, 100)  'Clear search field of any pre-existing text
                System.Threading.Thread.Sleep(1000) 'Give table time to repopulate
                Pages.LookupEdit.Text.MouseClick
                Manager.Desktop.KeyBoard.TypeText(lookupText, 50, 100)   'Enter value held in lookupText (e.g. London) in 'Text'
                System.Threading.Thread.Sleep(1000) 'Give table time to complete the search
                 
                NoMatchingTableCell.Wait.ForExists(10000)
 
                If (Assert.IsTrue(NoMatchingTableCell.IsVisible) = True) Then
                    'lookupText already exists, so empty the search field ready for the next
                    Pages.LookupEdit.Text.ScrollToVisible(ArtOfTest.WebAii.Core.ScrollToVisibleType.ElementTopAtWindowTop)
                    ActiveBrowser.Window.SetFocus
                    Pages.LookupEdit.Text.MouseClick
                    Manager.Desktop.KeyBoard.TypeText("", 50, 100)
                    System.Threading.Thread.Sleep(1000)
                Else
                    Pages.LookupEdit.AddSpan.Click(false)
                    Pages.AddNewLookupItem.HtmlTag.BaseElement.Wait.ForCondition(Function(a_0, a_1) ArtOfTest.Common.CompareUtils.StringCompare(a_0.InnerText, "Add New Lookup Item", ArtOfTest.Common.StringCompareType.StartsWith), false, Nothing, 10000)
                    Pages.AddNewLookupItem.CultureBasedTextTextText.ScrollToVisible(ArtOfTest.WebAii.Core.ScrollToVisibleType.ElementTopAtWindowTop)
                    ActiveBrowser.Window.SetFocus
                    Pages.AddNewLookupItem.CultureBasedTextTextText.MouseClick
                    Manager.Desktop.KeyBoard.TypeText(lookupText, 50, 100)   'Add the new lookupText
                    Pages.AddNewLookupItem.ItemIsActiveCheckBox.Check(true, true)   'Check 'ItemIsActiveCheckBox' to be 'True'
                    Pages.AddNewLookupItem.Submit.Click(false)  'Click 'Submit' (Save button)
                End If
            End If
        Next col
    End If
    'All required text entries for the supplied lookupCode have been made, so exit back to the main Lookups screen
    Pages.LookupEdit.BackToListSpan.Click(false)
     
    'Free up resources:
    row = Nothing
    col = Nothing
    minCol = Nothing
    maxCol = Nothing
    input = Nothing
    app = Nothing
    inputBook = Nothing
    inputSheet = Nothing
    lookupText = Nothing
    theLookupCode = Nothing
    lookupCode = Nothing
    NoMatchingTableCell = Nothing
 
    'Close Excel, preventing any Save prompt, & free up the process
    inputBook.Saved = True
    app.Quit()
    app = Nothing
End Sub

When I execute this it fails on the first loop through, on the line:
          If (Assert.IsTrue(NoMatchingTableCell.IsVisible) = True) Then

Clearly I have not understood how the Assert statement works.  Please would someone help by reviewing the above VB subroutine and advise where I have gone wrong, or suggest a better alternative.

Many thanks,
Nigel Edwards, Transition Computing. 
Nigel
Top achievements
Rank 2
 answered on 06 Jun 2012
3 answers
141 views

I've been testing the manual testing features of test studio. I noticed some things that didn't seem right to me when I create and ran a manual test.


Setting Up A Manual test
1. It appears that the instructions for the test can only be stored for the entire test. I want to put screen captures and notes on each step. How do I do this?
2. Why can't I have a storyboard for a manual test?

Executing a Manual Tests.
1. It appears you can not delete a screen capture on a step. You can only save over the top? How do I delete one?
2. The screen capture tool isn't very good.  I would rather use snagit to capture screenshots and paste the capture into the step test - I can't seem to do that - why?
3. How do I see the results of a manual test that includes the screen shots that were taken during the test run? I see no way to do this.
Byron
Telerik team
 answered on 05 Jun 2012
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?