locked
Test method xxxx.xxxxx threw exception: System.Runtime.Remoting.RemotingException: De verbinding met object /ebb0d479_cbd4_4ba9_9ce3_f9b17b4e8223/htkr6rp_hhht5xr3zr89hxxv_13.rem is verbroken of het object bestaat RRS feed

  • Question

  • I have a Unit Test's that gives a exception:

    Test method bisapo_test.Test.clsTestPreferentie.Preferentie_A02 threw exception:  System.Runtime.Remoting.RemotingException: De verbinding met object /ebb0d479_cbd4_4ba9_9ce3_f9b17b4e8223/htkr6rp_hhht5xr3zr89hxxv_13.rem is verbroken of het object bestaat niet op de server..

    And the exception only accurs when you "RUN" multiple tests. I you run only this test everything is fine, and the test wil be "passed".
    The test run's a procedure in the database. (SQL Server 2008/2005 and also 2000!)

    My question is: How do i get a normal human readable exception?

    Friday, May 18, 2012 9:21 AM

Answers

  • Hi Roger,

    Thank you for posting in the MSDN forum.

    As you said that you get the message when you run multiple tests. If you right click the unit test result in Test windows, then select “View Test Results Details”, did you get any other error message?

    But the question remains: How do i convert: "/ebb0d479_cbd4_4ba9_9ce3_f9b17b4e8223/htkr6rp_hhht5xr3zr89hxxv_13.rem" to "TestContext generated a error while writing a line." ?

    Not very sure about this issue, would you mind letting us know more information about it? What result did you want to get?

    Do you mean that you want to log a message in the test result? If so, Gautanm post a blog about Logging a message in test result as part of an automated test, it shared us the useful information when we want to print more log info in the test result. If possible, please check it.

    [TestMethod]

               public void CodedUITestMethod1()

                 {

                    Console.WriteLine("Console.WriteLine()");

                     Console.Error.WriteLine("Console.Error.WriteLine()");

                     TestContext.WriteLine("TestContext.WriteLine()");

                     Trace.WriteLine("Trace.WriteLine()");

                    Debug.WriteLine("Debug.WriteLine()");

                 }

    Reference:

    Is there any way to print more log info in the test result when we use Database unit test in VSTF2010?

    Best Regards,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us

    • Marked as answer by Roger Keulen Tuesday, May 22, 2012 8:06 AM
    Monday, May 21, 2012 7:40 AM
  • No, i just removed the logging for that perticular test, so i get on with the other tests i have to make.

    If the test in the future failes, i just 'un-comment' the logging and just debug. It doen't fail when debugging. So it's a working solution for me.

    Thanx for helping !


    I like syntactic sugar in my coffee. (And still waiting for LinqToBeer)

    Tuesday, May 22, 2012 8:18 AM

All replies

  • I have fixed the problem.... Now i don't log with: If TestContext IsNot Nothing then TestContext.WriteLine(LogText)
    Because "TestContext" is not nothing, it tries to write a line but failes doing that.....

    So: Now i don't have the error anymore nor do i have logging.

    But the question remains: How do i convert: "/ebb0d479_cbd4_4ba9_9ce3_f9b17b4e8223/htkr6rp_hhht5xr3zr89hxxv_13.rem" to "TestContext generated a error while writing a line." ?

    Anyone?

    Friday, May 18, 2012 10:40 AM
  • Hi Roger,

    Thank you for posting in the MSDN forum.

    As you said that you get the message when you run multiple tests. If you right click the unit test result in Test windows, then select “View Test Results Details”, did you get any other error message?

    But the question remains: How do i convert: "/ebb0d479_cbd4_4ba9_9ce3_f9b17b4e8223/htkr6rp_hhht5xr3zr89hxxv_13.rem" to "TestContext generated a error while writing a line." ?

    Not very sure about this issue, would you mind letting us know more information about it? What result did you want to get?

    Do you mean that you want to log a message in the test result? If so, Gautanm post a blog about Logging a message in test result as part of an automated test, it shared us the useful information when we want to print more log info in the test result. If possible, please check it.

    [TestMethod]

               public void CodedUITestMethod1()

                 {

                    Console.WriteLine("Console.WriteLine()");

                     Console.Error.WriteLine("Console.Error.WriteLine()");

                     TestContext.WriteLine("TestContext.WriteLine()");

                     Trace.WriteLine("Trace.WriteLine()");

                    Debug.WriteLine("Debug.WriteLine()");

                 }

    Reference:

    Is there any way to print more log info in the test result when we use Database unit test in VSTF2010?

    Best Regards,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us

    • Marked as answer by Roger Keulen Tuesday, May 22, 2012 8:06 AM
    Monday, May 21, 2012 7:40 AM
  • Hi there,

    Error message:

    Test method bisapo_test.Test.clsTestPreferentie.Preferentie_A02 threw exception:  System.Runtime.Remoting.RemotingException: De verbinding met object /4de41705_1841_4bb2_92db_5f5490f2cfed/px2ddjyzbeouu8q2izs71ucc_6.rem is verbroken of het object bestaat niet op de server..

    Server stack trace:
       bij System.Runtime.Remoting.Channels.ChannelServices.CheckDisconnectedOrCreateWellKnownObject(IMessage msg)
       bij System.Runtime.Remoting.Channels.ChannelServices.SyncDispatchMessage(IMessage msg)

    Exception rethrown at [0]:
       bij bisapo_test.Base.clsBaseTest.LogTekst(String LogTekst, Object[] Args) in C:\Priaut\code\bisapo-test\Test-Raamwerk\Systemen\clsBaseTest.vb:regel 384
       bij bisapo_test.Test.clsBasePreferentie.clsGImport.Execute(enmFuncties Functie) in C:\Priaut\code\bisapo-test\Tests\BisApo\Preferentie\clsBasePreferentie.vb:regel 50
       bij bisapo_test.Test.clsTestPreferentie.Preferentie_A02() in C:\Priaut\code\bisapo-test\Tests\BisApo\Preferentie\clsTestPreferentie.vb:regel 81

    So, not a clear message. But i don't mind, i just removed all the logging at this special test and now it runs fine.
    the problem also only accurs when running, with debugging everything works well. Also if i only run this test alone.
    But it's not a problem for me to have no logging at the momemt for that perticular test, i have 635 other test with logging.
    So that one doesn't gone kill me. (i hope)

    The line that makes the thing go bang: If TestContext IsNot Nothing Then TestContext.WriteLine(`something`)

    But it's VS2005 (So who cares, it 7 years old!) and my boss doesn't want to update. (He thinks vs2010 = .NET 4.0)

    I have a sollution now that works great: "don't log and hope it doesn't fail !" (It's 1 of 635 tests....)

    Thanx for the replay.


    Is this a Microsoft page? What the F&^$k am i doing here.....

    Monday, May 21, 2012 8:30 AM
  • Hi Roger,

    Glad to receive your reply.

    I have a solution now that works great: “don’t log and hope it doesn’t fail !” (It’s 1 of 635 tests….).

    Do you mean that you have resolved this issue? If you have solved, please mark the useful reply as answer. If not, please let us know the latest news about this issue. Thank you for your understanding!

    Sincerely,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us

    Tuesday, May 22, 2012 2:54 AM
  • No, i just removed the logging for that perticular test, so i get on with the other tests i have to make.

    If the test in the future failes, i just 'un-comment' the logging and just debug. It doen't fail when debugging. So it's a working solution for me.

    Thanx for helping !


    I like syntactic sugar in my coffee. (And still waiting for LinqToBeer)

    Tuesday, May 22, 2012 8:18 AM
  • Hi Roger,

    I agree with you, remove the logging for that specific test is a workaround, it is not the real solution, but as you said that you have 635 tests, I’m afraid that it is hard for us to repro this issue.

    If possible, you could share your project to us. You could attach your Visual Studio project, and then upload it to the sky driver, and then share the download link in your post.

    Anyway, remove the logging for that specific test is a workaround, I mark you reply as the answer.

    Best Regards,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us

    Wednesday, May 23, 2012 2:33 AM