Comments (10)
If appium closes instruments successfully, it will delete the .trace directories by default. If instruments crashes, they won't be deleted. Alternatives are:
- have appium delete extraneous directories on startup too
- create a "grunt cleanup" command that makes it easy to clean things up
from appium.
It'd be nice if they were deleted on startup and when @driver.quit is called.
from appium.
They are deleted in every case that appium itself doesn't crash due to an error or we can't get the name of the tracedir for some reason. So when you call @driver.quit, appium shuts down instruments and retrieves the name of the tracedir which instruments created (which we can always get except maybe in some rare instruments crash cases). It then (by default) removes this tracedir. So if you run a clean test, you should see no tracedirs in your appium directory afterward. Is this not your experience?
If what you're asking about is "how do we get rid of these even when something goes wrong and we can't know that a tracedir was created", then we'll have to resort to some kind of rm -rf *.trace
that just gets called at some point in the flow---and even this won't be guaranteed to run if we crash beforehand.
I'm more inclined to (a) try to figure out why these crashes are happening and exit gracefully instead, perhaps removing tracedirs that we detect in another way and (b) adding a "cleanup" script which gets rid of these along with the instruments socket and any other tempfiles that appium might have created. This could be run with grunt clean
or something similar.
from appium.
So if you run a clean test, you should see no tracedirs in your appium directory afterward. Is this not your experience?
Appium frequently crashes and I'm left with tons of instrumentscli0.trace
folders. I'd rather not have to manually run a cleanup script. Couldn't @driver.quit remove all .trace folders instead of just the most recent one? I don't see why it'd be helpful to retain them.
from appium.
It could, but for some people those tracedirs contain valuable diagnostic information (or so I have been told). I'm fine blowing them all away if a flag is set, though. Another issue with this particular suggestion is that if Appium itself crashes, we can't do anything at all on @driver.quit, since the server is no longer even listening. We could also do it on server startup, which doesn't guarantee no tracedirs ever, but at least keeps things more clean. Anyway, I'll go ahead and implement something that will delete these dirs more often.
from appium.
I guess the real solution is fixing the crash issues then it won't be a problem. A flag would be nice.
execute_script 'mobile: setRemoveAllTraceOnQuit', 1
from appium.
The flag I'm thinking of already exists, it's --remove
and on by default when starting the appium server itself (I think this is something for the server to know about, not the client---the client could be on a completely different machine, after all).
from appium.
Sounds good.
from appium.
let me know if this doesn't delete things often enough for you.
from appium.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
from appium.
Related Issues (20)
- Unable to install appium drivers on windows 11 HOT 4
- ERROR webdriver: Request failed with status 500 due to unsupported operation: This API is not supported anymore. See https://github.com/appium/appium/issues/15807 HOT 4
- Getting error "WDA is not listening at 'http://127.0.0.1" HOT 14
- × Installing 'uiautomator2' using NPM install spec 'appium-uiautomator2-driver' HOT 1
- Large DOM structure takes long time and sometimes crashed appium HOT 4
- Unable to start appium session HOT 1
- Unable to start appium session using appium GUI inspector even after upgrading or installing appium v2.5 HOT 12
- Is there a way or any desired capabilities in which we can stop Appium from launching the app after installation. HOT 1
- How to get bundleId dinamically? HOT 2
- My automation tests are flaky- get alert text returns empty string sometimes HOT 7
- bug: updating appium, driver or plugin, is not synchronized in node_modules/.cache/appium/extensions.yaml HOT 6
- Issue when perform gestures on both Android and iOS HOT 3
- [Feat]: introduce getContextsWithDetails endpoint HOT 4
- bug: Scroll on Android don't work HOT 1
- [Feat]: Can I specify my own registry in "appium driver install --source=npm" HOT 4
- universal-xml plugin issue with webview mode HOT 7
- Appium server crashes and shuts down on first test HOT 21
- Real device architecture is not supported application after upgraded xcuitest driver to 7.15.1 HOT 6
- Nothing happen after Responding to client with driver.createSession() HOT 7
- Delete key on iOS keyboard is not working HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from appium.