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

Export test to c# code

3 Answers 155 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
dudi
Top achievements
Rank 1
dudi asked on 09 Aug 2011, 09:43 AM
Hi Telerik support

I have an evaluation version of the test studio.
Trying out the product I need to create a test scenario -which I successfully recorded.
Then I need to export it to c# code and use it in my code.

First of all it seems that the generated test solution is not completed.
some class references are missing:

  1. no Pages class not found
  2. Manager class not found
  3. ActiveBrowser  class not found

I could see no init code only final test steps using, what looks like, auto generated code (Pages)

Am I missing something ?

Thanks 

3 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 11 Aug 2011, 10:44 AM
Hello Dudi,

I'm not sure I understand what do you mean by "I need to export it to c# code and use it in my code".
All test steps are actually methods in .Net and If you need to see the code of a desired step, you can right-click on the step and select "Customize step in code". You can also add steps directly in code if you chose "Script Step" from the Add menu.  

You should be able to see the entire source code if you click on the "View Class" button. It's supposed to toggle between viewing the code for just one coded step and viewing the entire source code file with all the coded steps.  

The Pages class is defined in the Pages.g.cs(or .vb) file. We automatically generate this file every time you build your project 

The Manager class is part of ArtOfTest.WebAii.Core namespace. It manages the life spans and instances of all browser objects in the framework. It also manages the communication pipeline between the framework and all browsers.

Active Browser is actually a property(not a class). And this property is a member of the Manager class. It gets the last browser instance launched. 

I hope this answers your question!

Kind regards,
Plamen
the Telerik team
Vote for Telerik Test Studio at the Annual Automation Honors Voting!
0
john
Top achievements
Rank 1
answered on 11 Aug 2011, 02:06 PM
I see the same issue when I click convert all step to code but I am sending it to VB.NET.  I hope they can solve this issue.

thanks,
John
0
Plamen
Telerik team
answered on 12 Aug 2011, 10:35 AM
Hi John,

Can you provide more information on your issue? Are you getting an error when converting to code? If that is the case, what is the exact error you are experiencing? Please attach the execution log(into a .zip file) to be able to investigate this further. 

Hope to here from you soon!
 
Regards,
Plamen
the Telerik team
Vote for Telerik Test Studio at the Annual Automation Honors Voting!
Tags
General Discussions
Asked by
dudi
Top achievements
Rank 1
Answers by
Plamen
Telerik team
john
Top achievements
Rank 1
Share this question
or