sudharsan-selvaraj / appium-dashboard-plugin

Appium plugin that provides complete test logs, video recording of test and device logs(logcat and syslogs) for easy debugging.
114 stars 28 forks source link

Session stays running even after Appium Server Shut Down and restart of system #56

Open iepoch opened 2 years ago

iepoch commented 2 years ago

The Session keeps running even after a reboot/restart of the system and when I run appium with the plugin it restarts these sessions. But with no way to stop them. I have clicked the Pause and checked they did not stop. I tried killing any other connections along with pids and I can't find anything related. Not sure if it's a bug or if someone can tell me how to shut them down so I can delete the runs. image

sudharsan-selvaraj commented 2 years ago

@iepoch Thanks for reporting the issue. This is valid a bug from the plugin and it is fixed as part of https://github.com/sudharsan-selvaraj/appium-dashboard-plugin/pull/52

I will merge the PR and make a new release tomorrow that will solve the problem.

sudharsan-selvaraj commented 2 years ago

@iepoch Fix is now available in v1.0.0-beta.12. You can update the plugin using appium plugin update appium-dashboard command. Can you verify and close the issue if it's working as expected.

iepoch commented 2 years ago

@sudharsan-selvaraj I did try it this morning however I still have a issue it cleared the stack of sessions. However on 1 test run it kicked up 2 sessions one closed the other did not. I am running appium, webdriverio, and cucumber with page object model for reference. I do have 2 feature test but they do not run in parallel. So just to give you an understanding of what is happening a little bit again not running in parallel. Only 1 device is running not 2.

image

iepoch commented 2 years ago

I did a little check and my max instances was set to 10 when it should have been 1 which also is why I noticed some failures in my test since I only had 1 device spun up and not 2. So in that case it could have been trying to run in parallel on the one device and was causing the issue of seeing 2 test but on 1 device. Which did not allow it to close. I have 3 Scenarios running. So if you wanted a setup like mine to see the issue.

  1. First uninstall and reinstall the plugin for better clarity and visually see the issue.
  2. Added two Scenarios in one Feature
  3. and add 1 to another feature. I run them in a suite together based on the webdriverIO and cucumber setup. In the config 4. Then set Max instance set to 10 ( accident) and the capabilities is just 1 device iOS 15.2 iPhone Pro from the example above. Can be simple test but that should show you the spin up with 2 devices and 1 running continuously.

Please let me know if you need a full detailed step by step reproduction. But this should get you there to where I see the issue I hope. And thank you this tool really is awesome.

sudharsan-selvaraj commented 2 years ago

@iepoch Are you killing the web driver session at the end of each test execution? If the webdriver session is not killed, then appium server thinks that the session id is still active. That's the reason why you are seeing a spinner in the UI.