iterate only part of test

7 posts, 0 answers
  1. Maayan Alima
    Maayan Alima avatar
    2 posts
    Member since:
    May 2010

    Posted 31 May 2010 Link to this post

    hi,

    i already did Test Iterated.

    Now im trying to create test that login to the system (once ), and repeat few steps several times (different data each iteration).
    How can i group the second part of the test?


    thx,
    Maayan.
  2. Cody
    Admin
    Cody avatar
    3354 posts

    Posted 01 Jun 2010 Link to this post

    Hello Maayan Alima,

    If I understand correctly you want a test that is split into two parts:

    1. Part 1 simply logs onto the website
    2. Part 2 is a data driven test that performs the same action using different data points from some data source

    Do I understand correctly? To accomplish this create yourself two separate tests.

    • Test A simply logs onto the website
    • Test B assumes you're already logged onto the website and performs your data driven test.

    Now include Test A as the first step in Test B using "Test-as-a-Step" picking Test A as the referenced test.

    All the best,
    Cody
    the Telerik team


    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. Barbara
    Barbara avatar
    13 posts
    Member since:
    Aug 2012

    Posted 21 Apr 2011 Link to this post

    I just submitted the same question, but my login step is a 'test as a step' step followed by the steps that I want to iterate with the bound data.  But each time I execute the script, the login step is execute before each iteration.
  4. Dobry Zranchev
    Admin
    Dobry Zranchev avatar
    353 posts

    Posted 22 Apr 2011 Link to this post

    Hello Barbara,

    Thank you for writing.

    If I understand you correctly you want to execute the Login and Logout steps only once? If so there are a couple of possible solutions:
    1) You can use a TestList:

    1. Create a test that performs only login steps.
    2. Create a test that contains the steps that will be iterated.
    3. Create a test that performs the logout steps.
    4. Create a TestList and put all these tests above in the same order.
    5. Open Settings menu for the TestList. Find and check the property RecycleBrowser property.

    When you execute the TestList you will see that login and logout will be executed only once.

    Alternatively you can put the steps that you want to iterate in a separate test and databind this test (so that it will execute multiple iterations). Now add this test as a subtest (TestAsStep)  to a "main" test. The main test should begin with Logout, then go into the subtest and then end with the Logout. Now when you execute this "main" test the Login and Logout will not be executed multiple times. Only the TestAsStep will have multiple iterations.

    If you still have any difficulties related to this, do not hesitate to contact us.

    All the best,
    Dobry Zranchev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Barbara
    Barbara avatar
    13 posts
    Member since:
    Aug 2012

    Posted 22 Apr 2011 Link to this post

    The TestList method worked beautifully - thank-you!
    The second method of embedding the test scripts inside a main script did not.  I watched the script execute and all seemed to be going as expected -logged in, iterated the steps to create the records 3 times and logged out,  but the results were '0 passed out of a 0 executed' although all three data records were created as expected when I checked the database.

    I've attached the screen print.

    This is the error I received when looking at the log: 

    ------------------------------------------------------------
    '4/22/2011 8:01:13 AM' - Error encountered during execution.
    ------------------------------------------------------------
    '4/22/2011 8:01:13 AM' - Error inside the callback listener. Error: System.Runtime.Serialization.SerializationException: AssemblyResolveEvent handlers cannot return Assemblies loaded for reflection only. ---> System.IO.FileLoadException: AssemblyResolveEvent handlers cannot return Assemblies loaded for reflection only.
       at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
       at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
       at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
       at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
       at System.Reflection.Assembly.Load(String assemblyString)
       at System.DelegateSerializationHolder.GetDelegate(DelegateEntry de, Int32 index)
       --- End of inner exception stack trace ---
       at System.DelegateSerializationHolder.GetDelegate(DelegateEntry de, Int32 index)
       at System.DelegateSerializationHolder.GetRealObject(StreamingContext context)
       at System.Runtime.Serialization.ObjectManager.ResolveObjectReference(ObjectHolder holder)
       at System.Runtime.Serialization.ObjectManager.DoFixups()
       at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
       at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
       at ArtOfTest.WebAii.Messaging.Process.PipeCommand.FromBinary[T](Byte[] bytes)
       at ArtOfTest.WebAii.Messaging.Process.PipeCommunication.ReadCommandFromPipe[T](PipeStream pipe)
       at ArtOfTest.WebAii.Design.Execution.RunnerController.CallBackListener()
    ------------------------------------------------------------
    '4/22/2011 8:01:13 AM' - Aborting....


     

     
  6. Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 29 Apr 2011 Link to this post

    Hello Barbara,
        this error is unrelated to what you're trying to do. It sounds like a know problem that's already logged as a bug. Here's the workaround:

    Go to where Test Studio is installed (example for default 64bit OS):
    C:\Program Files (x86)\Telerik\WebUI Test Studio 2010.3\Bin\
    and edit the config file ArtOfTest.Runner.exe.config to exclude the .Net Framework4 runtime - it should look like the example bellow:
    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
      <startup>
        <!-- <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/> -->
        <supportedRuntime version="v2.0.50727" sku=".NETFramework,Version=v3.5" />
      </startup>
    </configuration>


    Do make a copy of the original file just in case.
    Let me know whether this resolves the issue.

    Best wishes,
    Stoich
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  7. Barbara
    Barbara avatar
    13 posts
    Member since:
    Aug 2012

    Posted 16 May 2011 Link to this post

    I downloaded the new Test Studio and I am not seeing this problem anymore.  I have all three tests embedded.  A login step, a step that iterates and then a logoff step.  It executed the login, the iterative step twice as expected, and then the logoff step.  All three steps passed and the verbage was '3 our of total 3 executed' as expected.   The iterative step was a search rather than add, but I'm closing this case for now.  If I see any other problems, I'll open a new case.  Thank-you for fixing this!
Back to Top