Completed
Last Updated: 10 Feb 2015 07:19 by ADMIN
ADMIN
Ivaylo
Created on: 05 Feb 2015 07:47
Type: Bug Report
4
Coded steps disappear in Visual Studio plugin when user double click on Coded Step for specific project
Steps to reproduce

Using the project attached internally.

1. Open this solution in Visual Studio.
2. Open CheckYomiAccountName.tstest
3. Double click on any step - code-behind file is opened successfully.
4. Switch back to .tstest tab - steps are disappeared.
7 comments
ADMIN
Daniel Djambov
Posted on: 10 Feb 2015 07:19
Telerik: this is because the coded steps are in the context of the Custom class you created. If you move them in the class BaseWebAiiTest and the proejct is configured for it, then they will be shown in both Test Studio and Visual Studio without any additional setup. If you want to use a custom base class for some reason, you have to take care of defining it properly and having the coded steps in the proper class.
algot
Posted on: 09 Feb 2015 15:22
Using 'BaseWebAiiTest' as code base class causes disappearing coded steps from Test Studio.
ADMIN
Daniel Djambov
Posted on: 09 Feb 2015 15:15
Telerik: using 'BaseWebAiiTest' as code base class will ensure you can use both Visual Studio and Test Studio with coded steps without any additional changes needed. Using Custom base class seems to have specific behavior in the two different IDEs.
algot
Posted on: 09 Feb 2015 12:18
Visual Studio plugin works fine even if I use BaseWebAiiTest in recording options.
I need to work in both (Test Studio and Visual studio) application simultaneously. But it seems it is impossible in the current version of Test Studio.
ADMIN
Daniel Djambov
Posted on: 09 Feb 2015 11:47
Telerik: you have to include the full path with namespace in order for it to work in Visual Studio only.
algot
Posted on: 09 Feb 2015 10:46
I deleted CustomWebAiiTest class accidentally when I prepared test project for the ticket. 
My main project has this test and I fixed it in my test project for this ticket.

Now if I use partial path to my base class Test Studio works OK.
If I change base class setting to CRM_Autotests.CustomWebAiiTest steps disappear from Test Studio.
http://screencast.com/t/rkK93NNfWx5
ADMIN
Daniel Djambov
Posted on: 09 Feb 2015 09:58
Telerik: this is hapenning because you have changed the Test Studio project code base class 'BaseWebAiiTest' to 'CustomWebAiiTest', which does not inherit the original and thus the coded steps cannot be resolved. In order to fix your code so you are able to see your coded steps, you should do 2 steps: 
1. in Test Studio project settings Recording options, use the full path to your custom base class, including the namespace, i.e. 'CRM_Autotests.CustomWebAiiTest' ; 
2. generate in the project an independant class that defines the inheritance of your custom base class from Test Studio 'BaseWebAiiTest', i.e. 

using ArtOfTest.WebAii.Design;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CRM_Autotests
{
    public class CustomWebAiiTest : BaseWebAiiTest
    {
    }
}