简体   繁体   中英

Unittesting Callable Orchestrations

Working with BizTalk, I like to use callable orchestrations (without pipelines) as a service for other orchestrations, giving more flexibility in the architecture. But unittesting them is rather devious. Now, I use a seperate application with a wrapper orchestration (just calling the orchestration to test) that I deploy to BizTalk before unittesting.

Does someone have a better way to unittest callable orchestrations? Most preferrably, I would have a unittest where I don't need any extra artifacts to deploy.

Thanks in advance.

It is hard to answer an open question with NO , but my answer would be that that it is not practically possible.

Orchestrations are really tightly coupled with the BizTalk orchestration engine. If you want to unit test an orchestration, you will need to simulate that orchestration engine. That is not an easy job. There are a lot of specifics there that you have to think about, like dehydration, serialization, scopes, how messaging to and from your orchestration actually works, etc..

I would say that you are taking the right steps by separating out parts of your orchestrations, and not making them direct bound on physical ports. That makes testing possible / easier. Less connections also means less points of error.

I would try to limit the amount of orchestration work that you do. Only use an orchestration when there is no better (or at least more testable) alternative.

If you can test your orchestration quickly and without to much effort, by simply deploying, dropping a message, and watching the results, than you are already doing more testing than a whole suite of BizTalk developers. If you make this process easy, and automate it where you can (deploy, drop file, check expected output) then you will at least make it easier to detect regressions.

The goal is to make testing so easy / cheap and so reliable, that is easier to test than not to test. That way you will prevent managers from saying skip the tests, they take too long . You will want them asking: can you test it first?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM