none
BizTalk 2009 Unit Tests RRS feed

  • Question

  • I am trying to execute Unit Tests against a schema that uses imports.  All of my unit tests against the sub-schema work, but when it runs against the main schema, it fails.  The error message is as follows

    TOMTreeGenerator.GetElementAbsoluteType: Object reference not set to an instance of an object.

    I assume, it is unable to find the schema that the import points to.  Can anyone point me in the right direction?

    Thanks,

    Todd

    Tuesday, July 21, 2009 7:44 PM

Answers

  • This looks like an error from within VS using BizTalk 2009. Is this correct?

    It might be possible that this is a limitation of the automatic unit test generation for BizTalk artifacts. Did you check "enable unit testing" in the BizTalk project properties?

    Thanks,
    If this answers your question, please use the "Answer" button to say so | Ben Cline
    Monday, July 27, 2009 3:45 PM
    Moderator
  • Hi

    You have already received some answers, but let me just confirm the suspicion that Ben Cline has; It seems that the built-in unit test of schemas that BizTalk provides does not support unit test of schemas that import other schemas.

    Consider reading the BizTalk hotrod issue at http://biztalkhotrod.com/Documents/Issue7_Q3_2009.pdf for an approach to do the unit test.

    --
    eliasen


    eliasen, representing himself and not the company he works for.
    Three times MVP and three times MCTS in BizTalk.
    Blog: http://blog.eliasen.dk
    Monday, September 20, 2010 8:16 PM

All replies

  • Hi Todd,

    What schemas and XML instance are you using? If you don't mind I would like to reproduce the issue on my machine.

    Regards,
    Thiago Almeida - http://connectedthoughts.wordpress.com
    Sunday, July 26, 2009 9:14 PM
    Answerer
  • This looks like an error from within VS using BizTalk 2009. Is this correct?

    It might be possible that this is a limitation of the automatic unit test generation for BizTalk artifacts. Did you check "enable unit testing" in the BizTalk project properties?

    Thanks,
    If this answers your question, please use the "Answer" button to say so | Ben Cline
    Monday, July 27, 2009 3:45 PM
    Moderator
  • Hi

    You have already received some answers, but let me just confirm the suspicion that Ben Cline has; It seems that the built-in unit test of schemas that BizTalk provides does not support unit test of schemas that import other schemas.

    Consider reading the BizTalk hotrod issue at http://biztalkhotrod.com/Documents/Issue7_Q3_2009.pdf for an approach to do the unit test.

    --
    eliasen


    eliasen, representing himself and not the company he works for.
    Three times MVP and three times MCTS in BizTalk.
    Blog: http://blog.eliasen.dk
    Monday, September 20, 2010 8:16 PM