2

I'm implementing a project using .net-core and microservices base on eShopOnContainers. In my functional test I previously put all the tests in one class called IntegrationEventsScenarios.cs and now I need to separate tests by their related services. But when I run Basket Catalog and Ordering test scenarios together tests will not pass.

enter image description here

I have tried putting for example basket Scenariobase and Teststarup classes in Ordering folder to remove any shared resource but it didn't work.

Kaveh Naseri
  • 1,102
  • 2
  • 15
  • 24
  • Obviously, your tests are written so that they somehow interact and effect each other. Your unit and integration tests shouldn't do that, you'll probably want to run them in parallel on a CI/CD server in no defined order, they should be independent and isolated. I agree its a problem that you should fix but, I don't see a question here. – Jodrell Aug 25 '22 at 07:04
  • Thank you for your answer. @Jodrell I see that in [eShopOnContainers](https://github.com/dotnet-architecture/eShopOnContainers) project separated tests are implemented. Are you suggesting not to separate at all? – Kaveh Naseri Aug 25 '22 at 07:23
  • Definitely separated and organized in alignment with the services/components they are testing. However, whether they are separated or not, they should run independently without side effects. – Jodrell Aug 25 '22 at 07:34

0 Answers0