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

Telerik Test Studio: Code behind questions

3 Answers 105 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Kristof
Top achievements
Rank 1
Kristof asked on 30 Aug 2013, 09:10 AM
Dear all,

I'm currently having a couple of questions with using custom code-behind code and the related process in getting it to run with MSTest.

First of all: having a normal Test Studio project, purely created with the built-in features, I can commit it to Git, and run it on TeamCity by doing mstest /testcontainer:.\foobar.tstest

But, as soon as we have custom code-behind we run into the following issues:

You need to export from Test Studio to Visual Studio. This is a one way, one time operation, meaning changes in folder structure and adding new tests are not reflected in the csproj. Worse, we cannot export again since the Studio tells me: hey, the csproj is already there. <full stop>. I need to go on disk, delete the csproj and regenerate it through Test Studio.

Second: when we change the folder structure inside an exported csproj, for example:

<root>
- foo.tstest
- bar.tstest
- baz.tstest



Say foo.tstest is a 'shared' test, thus we want to put it into a folder, we create a new folder and move the foo.tstest there:

<root>
- Shared
   - foo.tstest
- bar.tstest
- baz.tstest

This causes the project to fail at runtime when we run bar.tstest or baz.tstest since their internal reference to foo.tstest doesn't get updated. Only way to mitigate this is opening each test in Visual Studio and saving it again, or opening the project in Test Studio and then closing it again (which seems to detect the movement).

Both of these things are quite cumbersome if we want to use MSTest to run our tests.

Am I not using the correct options to mitigate this problems?

Thanks,

-Kristof

3 Answers, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 30 Aug 2013, 08:31 PM
Hello Kristof,

Do you have Visual Studio? The reason I ask is that when you must use mstest for running your tests you'll be better off in the long run using our Visual Studio plug-in. You still get all the full test recording and maintenance capabilities that our standalone IDE gives you. You can do all your test maintenance in Visual Studio, including folders, test names, test locations, etc. just as easily as our standalone.

What you can't do in Visual Studio is:

  • Load testing
  • Performance testing
  • Running Test Studio test lists
If you don't use the above then doing everything in Visual Studio won't affect you.

You also have the option of opening the same physical project on disk in Visual Studio and Test Studio. This will work just fine (just don't open the project simultaneously in both).
Regards,
Cody
Telerik
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Kristof
Top achievements
Rank 1
answered on 02 Sep 2013, 07:39 AM
Hi Cody,

Thanks for the swift reply.

There is only one thing that bothers me when using Visual Studio, the fact that when you move tstest in Visual Studio all the tests using this test aren't updated accordingly, which makes mstest to fail. Is there a fix for this?
0
Cody
Telerik team
answered on 04 Sep 2013, 10:11 PM
Hi Kristof,

That was a bug we fixed quite a while ago. Have you tried this in the most recent build? I just verified it works perfectly fine in our latest internal build, 2013.1.827. Just make sure that our plug-in is activated by opening any test after launching Visual Studio. If you don't open a test, our plug-in doesn't get activated and you will get the behavior you describe.

Regards,
Cody
Telerik
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
Kristof
Top achievements
Rank 1
Answers by
Cody
Telerik team
Kristof
Top achievements
Rank 1
Share this question
or