Test Initialization Error with Latest WebAii framework

6 posts, 0 answers
  1. Vinay
    Vinay avatar
    47 posts
    Member since:
    Jan 2015

    Posted 05 Jun Link to this post

    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,
  2. Vinay
    Vinay avatar
    47 posts
    Member since:
    Jan 2015

    Posted 06 Jun Link to this post

    Any update?
  3. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    934 posts

    Posted 06 Jun Link to this post

    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
     
  4. Vinay
    Vinay avatar
    47 posts
    Member since:
    Jan 2015

    Posted 07 Jun in reply to Elena Tsvetkova Link to this post

    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.

  5. Vinay
    Vinay avatar
    47 posts
    Member since:
    Jan 2015

    Posted 07 Jun in reply to Elena Tsvetkova Link to this post

    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

  6. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    934 posts

    Posted 12 Jun Link to this post

    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
     
Back to Top