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

Webaii test code to run under Telerik Test Studio.

5 Answers 112 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
SD
Top achievements
Rank 1
SD asked on 10 Sep 2012, 03:29 AM

Hi,

Is it possible to run webaii tests (C# coded using MS VSE) within the Telerik Test Studio instead of Nunit ?
Ta.

5 Answers, 1 is accepted

Sort by
0
Ivaylo
Telerik team
answered on 13 Sep 2012, 07:21 AM
Hello SD,

From your question I'm getting a little confused, are you using our tests with coded steps or you are using Nunit tests? 
If you are using our webaii tests you just need to include them into a project and you will be able to run the test. If you are using Nunit tests it will not be possible to run them with Test Studio.

Regards,
Ivaylo
the Telerik team
Are you enjoying Test Studio? We’d appreciate your vote in the ATI automation awards.
Vote now
0
SD
Top achievements
Rank 1
answered on 16 Sep 2012, 11:04 PM
Hi, I'm refering to your Testing Framework (Webaii).

We've got bunch of tests that currently running using nunit.
We would like to stop using nunit and run the above tests using a commerical tool sucn as Test Studio.
Can Test Studio run tests written for nunit ?

Ta.


0
Ivaylo
Telerik team
answered on 19 Sep 2012, 03:23 PM
Hello SD,

Unfortunately Test Studio cannot run straight/unmodified NUnit tests directly, even those designed to use our Testing Framework.
The only option for you can be if you take your tests and modify them to run as coded steps instead. You will have to create a new Test Studio test for each NUnit test, then copy/paste the existing code into a new coded step.

All the best,
Ivaylo
the Telerik team
Are you enjoying Test Studio? We’d appreciate your vote in the ATI automation awards.
Vote now
0
SD
Top achievements
Rank 1
answered on 27 Sep 2012, 03:40 AM
Ta.

I have now downloaded the latest version of the Telerik Test Studio in an attempt to
see if we can run our tests using TS not Nunit as before and do so while using what you call 'Coded Steps'.
The thing is our code is desinged is a fully OOP fashion, i.e. test usally call test methods from other classes incl Enum-like types etc.

For example to login I'm using the following:

Navigate.Navigate_Generic(Environments.Local, Users.User1);
 The definitaion of Navigate_Generic is:
public static void Navigate_Generic(String Environment, String user)
     {
         Manager.Current.LaunchNewBrowser(Settings.Current.DefaultBrowser);
         Manager.Current.SetNewBrowserTracking(true);
         Manager.Current.ActiveBrowser.NavigateTo(Environment);//Manager.Current.Settings.BaseUrl
         Manager.Current.ActiveBrowser.WaitUntilReady();
         Manager.Current.ActiveBrowser.RefreshDomTree();
 
         Manager.Current.ActiveBrowser.Find.ByName<HtmlInputText>("j_username").Text = user;
         Manager.Current.ActiveBrowser.Find.ByName<HtmlInputPassword>("j_password").Text = "somepassword";
         Manager.Current.ActiveBrowser.Find.ByName<HtmlInputSubmit>("submit").Click();
 
         if (Manager.Current.Browsers[0].Find.ByAttributes<HtmlControl>("value=Log me in") != null &&
             Manager.Current.Browsers[0].Find.ByAttributes<HtmlControl>("value=Log me in").IsVisible())
         {
             Manager.Current.Browsers[0].Find.ByName<HtmlInputSubmit>("submit").Click();
             System.Threading.Thread.Sleep(3500);
         }
 
         WaitForWindow(2);
 
         Manager.Current.SetNewBrowserTracking(false);
         Manager.Current.ActiveBrowser.Window.Maximize();
        M anager.Current.ActiveBrowser.RefreshDomTree();
 
         Assert.True(Manager.Current.ActiveBrowser.ContainsText("Dashboard"), "Dashboard didn't show up");
     }
You get the idea.
Is it possible to use TS in the same way ? We understand that TS stand alone is not a full IDE.

Ta.

0
Ivaylo
Telerik team
answered on 27 Sep 2012, 01:27 PM
Hello Sd,

Yes, it is possible to use Test Studio in the way you are describing. It is not a problem to call test methods from other classes. 
Please note that they need to be in the same project, you cannot call methods from different projects.

Kind regards,
Ivaylo
the Telerik team
Are you enjoying Test Studio? We’d appreciate your vote in the ATI automation awards.
Vote now
Tags
General Discussions
Asked by
SD
Top achievements
Rank 1
Answers by
Ivaylo
Telerik team
SD
Top achievements
Rank 1
Share this question
or