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

Test Initialization Error with Latest WebAii framework

5 Answers 124 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Vinay
Top achievements
Rank 1
Vinay asked on 05 Jun 2018, 11:39 AM
Hi Telerik,
We want to upgrade our solutions to latest telerik framework i.e Testing_Framework_2018_1_0418_2_Free. But while launching a browser for any test using any of the browser using RunTest option from visual studio, we are getting following below exception. When I am using Debug Test option from VS 2015, the same test is working for me on IE,chrome and firefox browser. I am only seeing the below issue when i use "Run Test" option.
[TestMethod, Description("This is test.")]
        public void CbRegression_SmartTag_LoginTest()
        {
            Manager.LaunchNewBrowser(BrowserType.InternetExplorer);
            ActiveBrowser.NavigateTo("http://news.google.com/");
        }


"ArtOfTest.WebAii.Messaging.Process.ExecutionMediator" threw an exception. System.Reflection.ReflectionTypeLoadException- unable to load types.
Please note that i am using BaseTest class to intialize the test and my targetted framework is 4.5 and VS2015.
Please see the attached error screenshot on test intialization.

Thanks & Regards,

5 Answers, 1 is accepted

Sort by
0
Vinay
Top achievements
Rank 1
answered on 06 Jun 2018, 12:15 PM
Any update?
0
Elena
Telerik team
answered on 06 Jun 2018, 02:37 PM
Hi Ranjeet,

Thank you for reaching us out. 

The misbehavior you are facing is really strange and I will need some assistance from your end to identify what might be causing it.

First I would like to kindly ask you if it will be possible to share your project with us - it will not be necessary to run the tests but we would like to double check if the test initialization is correct. 

Next thing you could provide is the rest of the error message - as of the screenshot it is visible that this is not the whole message and probably the types which could not be loaded are listed. If the whole message is visible it could bring further useful information. 

Thank you in advance! I am looking forward to hearing back from you. 

Regards,
Elena Tsvetkova
Progress Telerik
 
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
 
0
Vinay
Top achievements
Rank 1
answered on 07 Jun 2018, 12:55 PM

Hi Elena,

Thanks for your quick response.

I can't share my project ith you. I am sharing the test intialization file. Please see the attached file.

TelerikSettings = GetSettings();
                // Note: Setting 'TelerikSettings.AnnotateExecution' to 'true' seems to cause problems when running tests with Firefox.
                TelerikSettings.AnnotationMode = AnnotationMode.All;
                TelerikSettings.LogLocation = this.TestContext.TestLogsDir;
 
                TelerikSettings.Web.DefaultBrowser = TestEnvironment.BrowserId.GetBrowserType();
                TelerikSettings.UnexpectedDialogAction = UnexpectedDialogAction.DoNotHandle;
                TelerikSettings.Web.EnableSilverlight = true;
                TelerikSettings.Web.EnableScriptLogging = true; // This enables capturing JavaScript console messages.
 
                this.Initialize(TelerikSettings, new TestContextWriteLine(this.TestContext.WriteLine));
                SetTestMethod(this, (string)TestContext.Properties["TestName"]);

 

Please note that the error attached above is the full error.

0
Vinay
Top achievements
Rank 1
answered on 07 Jun 2018, 12:58 PM

Hi Elena,

Thanks for your quick respnse.

I can't share the project. Though i am sharing the test intialization code. Please find the attached zip.

Please note that the above shared error is the complete error.

 

Thanks & Regards

0
Elena
Telerik team
answered on 12 Jun 2018, 12:45 PM
Hi Ranjeet,

Thank you for the additional details. 

We reviewed the provided file but we cannot use it to identify the exact error you have encountered. Please note that to identify the inner exception for such kind of errors you need to retrieve the LoaderException and its properties as well. You could refer to a forum post here which explains further details. I would like to kindly ask you re-generate the error and send the details. 

Thanks in advance for your cooperation! 

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