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

Debug coded steps

3 Answers 568 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ohsha
Top achievements
Rank 1
Ohsha asked on 02 Apr 2012, 04:53 PM
Hi, 

Is it possible that I single step through my coded step?

thx

3 Answers, 1 is accepted

Sort by
0
Accepted
Anthony
Telerik team
answered on 03 Apr 2012, 10:33 PM
Hello Ohsha,

You can set a Breakpoint on a step, but not on individual lines within a coded step. 

As a work-around you can create additional coded steps and disperse the code between them, or add logging or message boxes at certain points in the original coded step:

All the best,
Anthony
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Accepted
Shashi
Top achievements
Rank 1
answered on 03 Apr 2012, 11:10 PM
Ohsha/Anthony,

If you are using the Visual Studio plugin to develop your tests, you can debug coded steps by running the test from Test View using the Debug Selection command available on the context menu of each test in that view.

a) Place your breakpoints in the coded step (cs file)
b) Switch to Test View
c) Right-mouse select your test  from the list and select Debug Selection on the context menu.
 
Test will stop at your first breakpoint.

Notes:  
a) If you execute your test using Run Selection (instead of Debug Selection) on the same context menu, break points on both the cs file and the recorded test file will be ignored.
b) When running this test using this method, you will not see icons next to your recorded steps to indicate they have been successfully executed as you do with QuickExecute.  After the test completes, the log file will be available in the Test Results window of Visual Studio (not in the Log link of the tstest file).
c) While this method will allow you to debug your code-behind file, break points in your recorded test file (tstest or aii) will *not* be honored.  To break in your recorded test file, you will need to run in QuickExecute mode - but this command does not honor breakpoints in the code-behind file. 

Anthony:  Are there any plans to address one or both of the limitations in item c?

Hope that helps,
Shashi
0
Accepted
Anthony
Telerik team
answered on 04 Apr 2012, 03:35 PM
@Ohsha
Shashi is correct; you can use the Test Studio VS plugin and the VS Test View to debug a coded step line by line. There is no comparable feature in the Standalone version, however.

@Shashi

I haven't heard about any plans in this area. Each test runner is recognizing and respecting breakpoints set by its own interface, but not the other.

Regards,
Anthony
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Tags
General Discussions
Asked by
Ohsha
Top achievements
Rank 1
Answers by
Anthony
Telerik team
Shashi
Top achievements
Rank 1
Share this question
or