Problem running test

3 posts, 0 answers
  1. S
    S avatar
    15 posts
    Member since:
    May 2011

    Posted 31 May 2011 Link to this post

    I executed my test without a problem, then I attempted to use the "customized code in step" option to allow me to test the date on screen against the current date.

    I had trouble compiling the code I added and at the time I did not want to fuss with it, so I removed the code and then I deleted the step.  Now when I go to run the script none of the steps run and I get the following message:

    ------------------------------------------------------------
    '5/31/2011 3:36:56 PM' - Starting execution....
    '5/31/2011 3:37:02 PM' - Detected custom code in test. Locating test assembly: Lending.dll.
    '5/31/2011 3:37:02 PM' - Assembly Found: X:\Akcelerant Software\Operations\QA Testing\Automation\Framework\Lending\bin\Lending.dll
    '5/31/2011 3:37:02 PM' - Loading code class: 'Lending_Calclator'.
    '5/31/2011 3:37:02 PM' - Failure detected during execution. Details:
    ------------------------------------------------------------
    '5/31/2011 3:37:02 PM' - System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Security.SecurityException: That assembly does not allow partially trusted callers.
       at Lending_Calclator..ctor()
    The action that failed was:
    LinkDemand
       --- End of inner exception stack trace ---
       at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck)
       at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache)
       at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache)
       at System.Activator.CreateInstance(Type type, Boolean nonPublic)
       at ArtOfTest.WebAii.Design.Execution.ExecutionUtils.CreateCodedTestInstance(Test test, TestResult result, String binariesFolder)
       at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.InternalExecuteTest(Test test, TestResult initializationResult)
       at ArtOfTest.WebAii.Design.Execution.TestExecuteProxy.ExecuteTest(Test test, Settings settings, String deploymentFolder, String binariesFolder, ExecutionType exeType, Guid firstStepGuid, Guid lastStepGuid, IntPtr existingBrowserHandle, DebuggerOptions debuggerOptions)
    ------------------------------------------------------------
    '5/31/2011 3:37:03 PM' - Test completed!

     


    Any help you could give would be appreciated.

    Thanks
  2. Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 01 Jun 2011 Link to this post

    Hi S,
        are you loading your project from a Network location?

    The .Net framework doesn't allow for assemblies to be loaded from a remote location due to security restrictions.
    Please try running the project locally (i.e. copy it to your own machine and open it from there).
    The problem should disappear.

    Regards,
    Stoich
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

  3. S
    S avatar
    15 posts
    Member since:
    May 2011

    Posted 01 Jun 2011 Link to this post

    That was it - thanks
Back to Top