1

I am using Fit library with custom fixtures. I see that it is the same SUT java process exists for all of the tests under the test suite. Each of the tests in suite is a making a connection to the TcpServer. If run as a suite I see the port blocked and address bind issues for the consequent tests. I tried to work with introducing Sleep between the tests, that did not help.

I want to know how can I run the suite in a way where each test run is run in a new process ?

Laurent Bristiel
  • 6,819
  • 34
  • 52
Kedarnath
  • 260
  • 1
  • 3
  • 13
  • I do not believe there is a (standard) way to do this. Can you elaborate why you want to do this (it seems a coding smell if tests can not run in the same process)? The one way I can think of is not running a suite but starting each test independently, that would create a process for each, but does require you to start all on their own. – Fried Hoeben Dec 25 '14 at 11:14
  • Hey Fried. Thanks for your response. I have edited the question with more details, hope it answers your question. – Kedarnath Dec 25 '14 at 11:29
  • Instead of having a new process for each run, can't you reuse the connection in each test (having it in a static instance variable somewhere), or explicitly close the connection if your tests finds the port blocked so that it can be re-opened? – Fried Hoeben Dec 25 '14 at 13:21
  • Hey Fried, thats certainly a possibility. I see resources clearly flushed in each test. I am now more inclined to believe Fitnesse is goofing up the things. – Kedarnath Dec 26 '14 at 10:11

0 Answers0