The port #8100 is occupied by an other process. You can either quit that process or select another free port

I am facing the issue if running the multiple test cases .It runs the first test case.After that it displays the error log : The port #8100 is occupied by an other process. You can either quit that process or select another free port.

But I have been cleaning the port before intializing the driver .

I have gone through the release notes of appium version 1.16.0 it states that ,

"Make sure ports are properly closed when cleaning up (appium/appium-xcuitest-driver#1094) "

Need help on this …!!!

First, update your appium version to latest :slightly_smiling_face:
As there’s not much information about what tools you use, language and running the multiple test cases… i can only guess.
2nd: be sure you end properly the connection : http://appium.io/docs/en/commands/session/delete/
3rd: Add few seconds delay after the session close.
4th: If you run multiple test cases on same device, know that only one instance of WDA will be used ( afaik ) So… if you run to different devices, it’s simple to setup capabilities , by changing the wdaLocalPort to specific port to Each test case.

Hope that helps.