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

Coded step errors in AJAX setting

4 Answers 54 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Alex Rak
Top achievements
Rank 2
Alex Rak asked on 01 Oct 2012, 06:02 PM
Hi,

I'm testing an AJAXified RadGrid on a web page. I want to make sure that sorting works properly. So I've created a coded step that would iterate each row, pool the values from a given column, and compare the list to a sorted sample.

The step passes if I run it right after the initial page load, but when I start clicking grid headers before running my step, that's when it hits the fan.

All my steps that simulate clicking different column headers, do pass. The grid's content is getting updated via AJAX on each click, though. When it's time for my coded step to be executed I have two issues:

(1) the test fails as it seems to be using the initial loaded page content (not the version updated via AJAX), and

(2) I can't debug the code using breakpoints as the debugger gives me the following error: "Unable to apply this change while debugging. File '(snip)\Pages.g.vb' was reloaded. You must revert the change or stop the debugging session."

So it seem like the Pages.g.vb file is regenerated with each AJAX call, but the coded step is bound to the inital version.

How would I fix this scenario?

Regards.
 
EDIT: This post might better belong to regular Test Studio forum, but it does refer to a Visual Studio 2010 plugin.




4 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 05 Oct 2012, 09:22 AM
Hi Alex Rak,

I apologize for the delay in getting back to you on this. After each click on a column header element, you need to wait for the AJAX Postback to complete as seen in this article. Once it's completed, your coded step should act against the updated grid content.

The Pages.g.vb file is dynamically generated on each run, so it's not allowed to have that file open during debugging, otherwise you'll receive the "Unable to apply this change while debugging.." error.

If you continue to have difficulty, would it be possible to provide us with the means to reproduce the issue locally(either in your app or on a public site)? If not, a Jing video demonstrating and the issue may also help us to better understand what is happening.

Regards,
Plamen
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Alex Rak
Top achievements
Rank 2
answered on 05 Oct 2012, 03:29 PM
Hi Plamen, thanks for getting back on this.

I do have delays in my test to make sure AJAX response is processed. I'm attaching the test VS2010 project.

If you run the test in debug mode, you will see that the it fails as the test column data is stale.

Now, try to set a breakpoint inside the coded step, and navigate it with "Step Forward (F10)". The compiler will never get there.

So what exactly am I missing here?

Regards.
0
Plamen
Telerik team
answered on 10 Oct 2012, 03:31 PM
Hello Alex,

Thank you for providing the project. I was able to reproduce the issue and logged it as a bug here: Public URL. This turned out to be a complex issue however, and our developers will need more time to fix it. I'll update this thread once we have a fix for this.

I have also updated your Telerik points for discovering the issue.

All the best,
Plamen
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Plamen
Telerik team
answered on 23 Oct 2012, 08:56 AM
Hi Alex,

I'm writing to inform you that we just released a new internal build, version 2012.2.1022. This fix is included in the build. You can download it from your Telerik account here: Public URL

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