channeladam / ChannelAdam.TestFramework.BizTalk

A full .NET Framework automated testing library for testing BizTalk 2010/2013/2016 artifacts.
Apache License 2.0
0 stars 0 forks source link

TestFramework.BizTalk has dependency on ChannelAdam.TestFramework Version=1.0.0.0 #1

Closed geoffCorney closed 5 years ago

geoffCorney commented 5 years ago

Hi I work for the Oxford University software solutions group and we currently use BizTalk 2010 and have plans to move to BizTalk 2016 or 19. I have been looking at BizTalk test frameworks and came across the Channel Adam test framework for BizTalk which looks very useful.

I have set up a test project with a target framework .Net 4.6 on a BizTalk 2016 development environment and installed the ChannelAdam.TestFramework.BizTalk from NuGet and have the following installed. Castle.Core 4.31 Channel.Adam.Core 1.6.2 (Which I see is deprecated) Channel.Adam.Logging 2.1.0 Channel.Adam.TestFramework 2.2.1 Channel.Adam.TestFramework.BizTalk 1.3 Channel.Adam.TestFramework.Moq 2.0.2 Channel.Adam.TestFramework.MSTest 2.0.0

I have used the code example in https://devzone.channeladam.com/library/channeladam-testframework-biztalk/

But I get a compilation error because class BizTalkXmlToXmlMapTester cannot be resolved. "Error CS0012 The type 'ILogAsserter' is defined in an assembly that is not referenced. You must add a reference to assembly 'ChannelAdam.TestFramework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=9fcb9bb550152cab'. R12.ChannelAdam.Test BizTalkMapTesting\R12.ChannelAdam.Test\X5CostingsToCanonicalCostingsTest.cs 38 Active"

It appears that there is a dependency on ChannelAdam.TestFramework, Version=1.0.0.0. I see in NuGet that Channel.Adam.TestFramework.BizTalk has a dependency on ChannelAdam.TestFramework (>= 1.7.0) so I am not sure of the cause of the problem.

Have I got the wrong versions of the framework components installed. I am probably just missing something blindingly obvious but if someone could give me a steer that would be great.

Many thanks, Geoff geoffrey.corney@it.ox.ac.uk

zevanreg commented 5 years ago

Hi, Same issue here. Looking at the code it looks like refactoring into separate libraries was not very successful :)

channeladam commented 5 years ago

Can you try downgrading to version 1.x of the Test framework library?

Version 2 of that and all the other libraries that were split out of Core are all .net standard 2 libraries and are not strongly named (because that is generally not preferred in the community). So for BizTalk, you need to stick with Core which is strong named, and the version 1 test framework.

Perhaps I need to add a constraint so that TestFramework.BizTalk has <2 for the Tesframework package...

zevanreg commented 5 years ago

I've tried to play with versions yesterday even before posting my comment :) There is a problem with dependencies between different packages. ChannelAdam.TestFramework.1.7.0 + ChannelAdam.TestFramework.BizTalk.1.0.3 would be OK, but for running the test we need a LogAsserter instance. ILogAsserter implementation classes are defined in ChannelAdam.TestFramework.MSTest, ChannelAdam.TestFramework.MSTestV2 and ChannelAdam.TestFramework.NUnit libraries, so we need to add them. But these libraries have dependency on ChannelAdam.TestFramework.Moq>=2.0.2, which in turn has dependency on ChannelAdam.TestFramework>=2.2.0. So in the end, we cannot use ChannelAdam.TestFramework.1.7.0 + ChannelAdam.TestFramework.BizTalk.1.0.3, because ChannelAdam.TestFramework.Moq.2.0.2 requires at least ChannelAdam.TestFramework.2.2.0.

channeladam commented 5 years ago

ChannelAdam.TestFramework.MSTestV2, ChannelAdam.TestFramework.Moq and ChannelAdam.TestFramework.NUnit were all created comparatively recently and are thus not suitable to use with the BizTalk libraries - you'll probably need to remove references to them.

Only the original ChannelAdam.TestFramework.MSTest v1.x would be compatible.

zevanreg commented 5 years ago

OK, now it's clear and it works. Thank you!

channeladam commented 5 years ago

NuGet package updated with dependency change on TestFramework.BizTalk to (>= 1.7.0 && < 2.0.0) https://www.nuget.org/packages/ChannelAdam.TestFramework.BizTalk/1.0.4