This is a migrated thread and some comments may be shown as answers.

Organizing Tests in folders

9 Answers 187 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Reddy
Top achievements
Rank 1
Reddy asked on 12 Sep 2012, 06:45 PM
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.

9 Answers, 1 is accepted

Sort by
0
Accepted
Plamen
Telerik team
answered on 17 Sep 2012, 08:11 AM
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
0
Accepted
Mercedes
Top achievements
Rank 1
answered on 17 Sep 2012, 02:27 PM
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!!
0
Plamen
Telerik team
answered on 19 Sep 2012, 08:20 AM
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
0
Anthony
Top achievements
Rank 1
answered on 04 Nov 2015, 04:59 PM

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.


0
Ivaylo
Telerik team
answered on 09 Nov 2015, 11:44 AM
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!
0
Anthony
Top achievements
Rank 1
answered on 09 Nov 2015, 01:14 PM
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.
0
Ivaylo
Telerik team
answered on 12 Nov 2015, 08:58 AM
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!
0
Abdul Khader
Top achievements
Rank 1
answered on 17 Mar 2016, 02:55 PM

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.

0
Konstantin Petkov
Telerik team
answered on 18 Mar 2016, 03:23 PM
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!
Tags
General Discussions
Asked by
Reddy
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Mercedes
Top achievements
Rank 1
Anthony
Top achievements
Rank 1
Ivaylo
Telerik team
Abdul Khader
Top achievements
Rank 1
Konstantin Petkov
Telerik team
Share this question
or