Organizing Tests in folders

10 posts, 2 answers
  1. Reddy
    Reddy avatar
    23 posts
    Member since:
    Jul 2012

    Posted 12 Sep 2012 Link to this post

    My folders are currently organized in this manner:

    Project -> Tests + (Folders  -> Tests )

    In a test under the folder, i have a coded step to run a test based on an IF Condition but i am getting an error

    Exception thrown executing coded step: '[Forms_Selection] : Selection'.
    InnerException:
    System.IO.FileNotFoundException: Unable to find test 'C:\Program Files (x86)\Telerik\Test Studio Projects\MPL_Project\..\PL 0001A 0909'
       at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteTestInCurrentContext(String relativeTestPath)
       at ArtOfTest.WebAii.Design.BaseWebAiiTest.ExecuteTest(String relativeTestPath)
       at Forms_Selection.Forms_Selection() in C:\Program Files (x86)\Telerik\Test Studio Projects\MPL_Project\Forms\Forms_Selection.tstest.vb:line 80

    The test as step does not seem to find the file in the folder structure.

  2. Answer
    Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 17 Sep 2012 Link to this post

    Hello Reddy,

    I am sorry to hear you are experiencing this problem. Please check whether this path 'C:\Program Files (x86)\Telerik\Test Studio Projects\MPL_Project\..\PL 0001A 0909' is correct. (i.e. does it actually lead to the intended test?).

    Also, please check whether the relative path you are using in the coded step is correct. If your folder structure is like this:
    1. Folder1 
        1.1. Folder2
                - SampleTest

    You can run the subtest using the following code:
    this.ExecuteTest("Folder1\\Folder2\\SampleTest.tstest");

    If you continue to have dificulty, please go ahead and send us a copy of your test project(in a .zip file), so that we can analyze it and try to determine what is causing the issue.

    Kind regards,
    Plamen
    the Telerik team
    Are you enjoying Test Studio? We’d appreciate your vote in the ATI automation awards.
    Vote now
  3. Answer
    Brian
    Brian avatar
    6 posts
    Member since:
    Aug 2012

    Posted 17 Sep 2012 Link to this post

    I was able to fix the script. There were a couple of changes that i had to do to make the script work.

    First, i had to change the path of the Me.Execute statement
    Initially i had Me.Execute("Test1"). Since the test1 was in another folder under the project, i was getting an error.

    I had to change that to Me.Execute("Folder1\\Test1.tstest") for the test to be detected and run from the subfolder.
    Please ignore the attachment.

    Thanks for the help!!
  4. Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 19 Sep 2012 Link to this post

    Hi Brian,

    I'm glad to hear you got it working! Thank you for the update.

    Kind regards,
    Plamen
    the Telerik team
    Are you enjoying Test Studio? We’d appreciate your vote in the ATI automation awards.
    Vote now
  5. Anthony
    Anthony avatar
    2 posts
    Member since:
    Jun 2013

    Posted 04 Nov 2015 Link to this post

    While this is an old thread I need some input/confirmation on our approach.
    Background:
    The QA team was manage by a Development lead and the Automation lead was a just out of college Java Developer.
    They tried to get the automated tests into TFS and after a few attempts they gave up and spawned a number of folders with sub folders with different purposes.
    After a few Reorg's the QA team was handed to me. I now have a handle on the day to day work and have a few Automated initiatives in play.
    The problem:
    The app under test is broken up with five distinct URL's. They all go to the same security layer but multiple URL's were used to keep it clear to the users.
    This lead to having five different folders for one app
    Under each app folder we have three, four or more subfolders i.e. sanity check, smoke test, basic regression, indepth regression and so on
    To me this is structure confusing as I have a structure like below:
    Main Application Automation Scripts
    > MainAppname.App_URLA
    >> 1 Smoke Tests
    >> 2 Sanity Tests
    >> 3 Basic Regression Tests
    >> bin
    >> Data
    >> Modules (this is where we keep the tests)
    >> Results
    >> Test Lists
    >> .....
    > MainAppname.App_URLA(Sanity Test)
    >> 1 Smoke Tests
    >> 2 Sanity Tests
    >> 3 Basic Regression Tests
    >> bin
    >> Data
    >> Modules (this is where we keep the tests)
    >> Results
    >> Test Lists
    >> .....
    > MainAppname.App_URLA(Sanity Test)Version1.0)
    >> 1 Smoke Tests
    >> 2 Sanity Tests
    >> 3 Basic Regression Tests
    >> bin
    >> Data
    >> Modules (this is where we keep the tests)
    >> Results
    >> Test Lists
    >> .....
    > MainAppname.App_URLA(SmokeTest)
    >> 1 Smoke Tests
    >> 2 Sanity Tests
    >> 3 Basic Regression Tests
    >> bin
    >> Data
    >> Modules (this is where we keep the tests)
    >> Results
    >> Test Lists
    >> .....
    > App_URL_B

    So, I want to restructure it so I can see all of the scheduled test lists on one place and it is not so confusing
    Should my approach be
    >MainApplication
    >> App_URLA
    >>> 1 Smoke Tests
    >>> 2 Sanity Tests
    >>> 3 Basic Regression Tests
    >>> bin
    >>> Data
    >>> Modules (this is where we keep the tests)
    >>> Results
    >>> Test Lists
    >>> .....
    >> App URLB
    >>> 1 Smoke Tests
    >>> 2 Sanity Tests
    >>> 3 Basic Regression Tests
    >>> bin
    >>> Data
    >>> Modules (this is where we keep the tests)
    >>> Results
    >>> Test Lists
    >>> .....
    >>App_URLC
    >>> 1 Smoke Tests
    >>> 2 Sanity Tests
    >>> 3 Basic Regression Tests
    >>> bin
    >>> Data
    >>> Modules (this is where we keep the tests)
    >>> Results
    >>> Test Lists
    >>> .....
    Or
    >MainApplication
    >> 1 Smoke Tests
    >> 2 Sanity Tests
    >> 3 Basic Regression Tests
    >> App_URLA
    >>> bin
    >>> Data
    >>> Modules (this is where we keep the tests)
    >>> Results
    >>> Test Lists
    >>> .....
    >> App URLB
    >>> bin
    >>> Data
    >>> Modules (this is where we keep the tests)
    >>> Results
    >>> Test Lists
    >>> .....
    >>App_URLC
    >>> bin
    >>> Data
    >>> Modules (this is where we keep the tests)
    >>> Results
    >>> Test Lists
    >>> .....
    Any thoughts would be greatly appreciated.
    Thanks.


  6. Ivaylo
    Admin
    Ivaylo avatar
    750 posts

    Posted 09 Nov 2015 Link to this post

    Hello Anthony,

    To be honest with you I do not understand what you are asking, what is your structure and what you are willing to achieve. It all looks to me like different projects in the way you have presented the structure. It would be nice and more descriptive if you provide screenshots with how things are currently organized and provide more information into what you are trying to restructure them.

    Please note that now you are writing in a public accessible thread so if you are going to share any sensitive data please make sure you submit a ticket, where all the provided information remains private.

    Thank you for your understanding and cooperation.

    Regards,
    Ivaylo
    Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  7. Anthony
    Anthony avatar
    2 posts
    Member since:
    Jun 2013

    Posted 09 Nov 2015 in reply to Ivaylo Link to this post

    I think the core issue is we don’t have a structure. We have a few main applications with different modules within them. 
    When it was first put together each module got its own folder so we ended up with many top level folders and below them many more folders depending on test type or generation of test.
    My goal is to be able to have one place to see all of the scheduled test lists regardless of module or type i.e. regression, quick sanity check, etc.
    Also I think it should be straight forward to find a test to update/modify. Today I have to search and check to find what I need to look at.
    So, I guess my question is, is there a best practice for the automated test folder structure?
    Thanks for your time.
  8. Ivaylo
    Admin
    Ivaylo avatar
    750 posts

    Posted 12 Nov 2015 Link to this post

    Hello Anthony,

    There is no straight answer to your question. It all depends on how large your product intend to become. It it is a small to mid-size project you can use it in only one project and use a folder structure simply as in Windows Explorer. 
    Another approach is to have different project for different major functionalities.

    It all depends on your needs and what will be the size of the automation project you are going to build.

    Regards,
    Ivaylo
    Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  9. Abdul Khader
    Abdul Khader avatar
    22 posts
    Member since:
    Feb 2016

    Posted 17 Mar in reply to Ivaylo Link to this post

    Hi Ivaylo,

     

    I have a query related to this thread, so thought of posting it here

     

    I have used following statement in my test "A"

     

    this.ExecuteTest(test B);

     

    My query is .. Can I fetch what is the result of this test ? whether it is Passed or Failed ?

    Please advise how can I get the status ?

     

    Note : I noticed that ExecuteTest is a Void type. So it wont return any value.

  10. Konstantin Petkov
    Admin
    Konstantin Petkov avatar
    1911 posts

    Posted 18 Mar Link to this post

    Hello,

    You can use the CodedTestResult object of BaseWebAiiTest class to obtain the result after ExecuteTest call. Just use it's Result property to find if the test passed or failed.

    Regards,
    Konstantin Petkov
    Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
Back to Top