Im writting unit test for a WCF service which i have written. The thing is when i run the Unit test it throw me error saying that there is no end point listening. I need to compile my WCF Service and later run the unit test.
Is there any other way where Unit Test runs and host the WCF service and later start testing.
Thanks in advance
Running a test against an actual WCF service would not be unit testing, it would be integration testing; if you want to do this you'd do it as part of an automated build process which deploys the service and then runs your tests.
To unit test your service, you should ignore the WCF aspect and call the service class directly, as if it were any other class.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With