If I rightclick my test from the TestExplorer and select 'Debug Selected Tests' from the popup menu. It appears that something may be happening but nothing ever does. In fact after having done this the timestamp in the log file is unchanged.
I have set a break point on the CodedStep viewer and then click the green arrow button 'Quick Execute' it runs but never enters into debug mode. It does pause where I have set my break point but not able to step into code with the debugger.
I do not know if this has anything to do with this but I changed my test steps so that they are guarenteed not to fail. I ran them form the step viewer to verify that they all pass. When I try to run the test from the TestExplorer I get the following error -
Test Name: corswebtest
Test FullName: TestStudio
Test Source: : line -1
Test Outcome: Failed
Test Duration: 0:00:00.6308335
Result Message:
One of the known types provided to the serializer via 'knownTypes' argument was invalid because it was null. All known types specified must be non-null values.
at ArtOfTest.WebAii.Design.ProjectModel.Project.LoadTest(String filePath)
at Telerik.TestStudio.TestAdapter.TestExecutor.ExecuteTestCase(TestCase testCase)
How can I step into the debugger given my environment?
6 Answers, 1 is accepted
This has become a popular question lately. To help make it crystal clear we just created and uploaded this new video which should give you everything you need to know:
http://tv.telerik.com/watch/automated-testing-tools/debugging-coded-test-steps-in-visual-studio
Cody
the Telerik team
Test Studio Trainings
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If I rightclick my test from the TestExplorer and select 'Debug Selected Tests' from the popup menu. It appears that something may be happening but nothing ever does. In fact after having done this the timestamp in the log file is unchanged.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Test Name: corswebtest
Test FullName: TestStudio
Test Source: : line -1
Test Outcome: Failed
Test Duration: 0:00:00.6308335
Result Message:
One of the known types provided to the serializer via 'knownTypes' argument was invalid because it was null. All known types specified must be non-null values.
at ArtOfTest.WebAii.Design.ProjectModel.Project.LoadTest(String filePath)
at Telerik.TestStudio.TestAdapter.TestExecutor.ExecuteTestCase(TestCase testCase)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
First see http://devw.wordpress.com/2011/06/04/one-of-the-known-types-provided-to-the-serializer-via-knowntypes-argument-was-invalid-because-it-was-null/
This is not exactly the same as they are refering to Win phone dev but this similar solution to the problem will work here.
This is what I did to fix this problem.
First add the following line of code to your test class.
public
class
WebTest : BaseWebAiiTest
{
ArtOfTest.WebAii.Design.ProjectModel.Project myProject =
new
ArtOfTest.WebAii.Design.ProjectModel.Project(
"C:\\"
);
#region [ Dynamic Pages Reference ]
private
Pages _pages;
This won't compile until you add the following reference.
System.Runtime.Serialization
I hope this helps someone.
My apologies for missing the latter 1/2 of your original post. My mistake!
Congratulations on finding a solution yourself! The solution you have posted makes me wonder why it was needed in the first place. Are you doing something other than ordinary simple coded steps? Are you including and referencing an external project/dll? Would you mind sending us a sample project where this solution was needed to solve the problem? We'd like to study it to better understand what's going on.
Cody
the Telerik team
Test Studio Trainings
I doubt if the group I am currently with will allow me to share the code. I can say this however so that you might be able to reproduce this bug. I have created a VS 2012 solution that has multiple testing projects in it, Microsoft CodedUI, UnitTest, WebStatusTest and last but not least Telerik's TestStudio project. I suspect if you create a testing solution with all those irons in the fire you might be able to re-create the problem. The application that I am testing is a jQuery UI / Asp.Net MVC 3 web app with VS 2012 as the IDE. One of the pieces that I am trying to test is the jQuery UI AutoComplete.
After having now used both Microsoft's Coded UI and Telerik's Test Studio I can highly recommend Test Studio and am really growing to loathe Coded UI more and more every time I use it. There are numerous reasons for this but the main one is that Telerik's tool actually let's you get at the DOM instead of some COM object automation layer in between goop. I have recommended that our group purchase a license for Telerik's Test Studio but unfortunately we probably won't be using it until our next project sometime in 2013.
Cody,
These links no longer take you to the correct video. How can I find the debugging-coded-test-steps-in-visual-studio video now?
http://tv.telerik.com/watch/automated-testing-tools/debugging-coded-test-steps-in-visual-studio
Regards,
Scott