WCF integration testing in TeamCity -
I want my integration test to run in each commute in TeamCity. What's the best way to run automatically for my WCF service test? The WCF service is part of a solution that has been tested.
Currently, I self-host the service in tests.
host = new ServiceHost (typeof (...), URL);
But I can not implement my actual IIS configuration file in this case. I could duplicate the settings with the code, but I rather not.
What are the best practices for continuous integration and WCF testing?
Note: I have seen WCFStorm and SoupUI but they are GUI based apps.
I create a service host class in my test project which starts on the assembly of the test project Hosts self service I want to invite
[Test class] Internal category service host {Private stationary service host < Service 1 & gt; M_Host = null; /// & lt; Summary & gt; /// sets the specified reference /// & lt; / Summary & gt; /// & lt; Param name = "context" & gt; Reference. & Lt; / Param & gt; [Assembly initial] Public static zero setup (test content reference) {// comment to run against local console host m_Host = new ServiceHost & lt; Service1 & gt; (); M_Host.Open (); } /// & lt; Summary & gt; /// tears fall /// & lt; / Summary & gt; [Assembly cleanup] Public static zero tiredown () {if (m_Host! = Null) {m_Host.Close (); }}}
In the examination I use ChannelFactory to start the service. I re-shut the service on AssemblyCleanup
Try {ChannelFile Please give the exam project with your relevant settings to relevant settings so that when it becomes hostile, this test will be relevant to the environment. It provides you with an automated black box test. I also use Mox to separate the part of the service for the exam.
Comments
Post a Comment