-
-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ISSUE-78] Test orchestrator support #273
[ISSUE-78] Test orchestrator support #273
Conversation
…data parser to json, initial solution to gather and pull images
@pedrovgs I have created a PR as a draft. Unit test are broken and code style. I have to fix it, but not having time in this week. Waiting for some feedback if something could be done better. |
@pedrovgs Implementation is finished. Last thing which should be done is testing on all shot-consumers projects with added/not added orchestrator. |
Hey, thanks for introducing this, I will test this PR tomorrow in our project which also rely on orchestrator. 👍 I'll keep you updated. |
I just tried this PR with no success, maybe I did it wrong:
|
@stetro Looks like getting library from remote repository before maven local. It seems to be a matter of priority of repositories. |
@pedrovgs Build failed with on one of shot-consumer project. Looks like something is wrong with this example or shot in 5.12.2, but it doesn't come from current version with my changes. We will try to test it on local machines as previous. |
Correct that's why I increased the version in step 2. To be totally sure :) |
@stetro Ahh, right. Both version name and version code? If yes, looks like i will have to check it again. |
Correct, I incremented both |
@stetro Ok, thanks for effort, will check when i find some time. |
@stetro is your project public maybe? Are you using composer? I found that composer with orchestrator doesn't work. Could you check it on emulator API 28? I remember that there is another issue on 29+ |
Its not using compose. Running on API 30 (only) and also a private repo 🙈 Testing with another emulator is not possible as well - If my usecase is too complex to verify and debug this, never mind, I just thought someone testing it would be helpful :) |
@stetro I meant composer (https://github.com/composer/composer), it is different tool. But information about not using compose is important as well. I started to think something could be wrong with facebook 0.14.0, but it needs more investigation. 🤷♂️ |
I hope you mean https://github.com/gojuno/composer 🙊 :D Bot no, thats also not used. |
@pedrovgs Have checked composer case and provided instruction to readme how to deal with composer + orchestrator. @stetro Yeah, copied wrong link. According your issues on API 30. Is there any suspicious logs in gradlew or in logcat? I found that could be a issue with hamcrest, because shot-android is using espresso 3.30, i had kaspresso which used 3.4.0 under the hood and it makes tests failed. Whole executeScreenshotTests tasks finished successfully but tests didn't make screenshots due to failing. |
@stetro Done testing on API 30 moment ago and works for me. Check your dependencies. I used same as used in shot-android module: val runner_version = "1.3.0"
val orchestrator_version = "1.4.1"
val android_test_services_version = "1.4.1"
val espresso_core = "3.3.0"
androidTestImplementation("androidx.test:core:${Dependency.runner_version}")
androidTestImplementation("androidx.test:runner:${Dependency.runner_version}")
androidTestImplementation("androidx.test:rules:${Dependency.runner_version}")
androidTestUtil("androidx.test:orchestrator:${Dependency.orchestrator_version}")
androidTestUtil("androidx.test.services:test-services:${Dependency.android_test_services_version}")
androidTestImplementation("androidx.test.espresso:espresso-core:${Dependency.espresso_core}")
androidTestImplementation("androidx.test.espresso:espresso-contrib:${Dependency.espresso_core}") Some of them could be updated in shot-android to newest versions but i don't want to make this PR bigger. Updates it is good thing for next enhancement. |
Hey guys sorry for the late response :( I've got covid and couldn't check this for a while. Sorry |
@mariuszmarzec I'm reading your comments and contributions and the only thing I can say is WOW and CONGRATS. I need more time to review the details but looks like everything is in place. Could you add another step to the CI to re-run the tests with composer enabled so we can ensure we don't break it in the future? Maybe we can use existing shot-consumer projects and change the build.gradle config based on an environment variable, what do you think? |
@pedrovgs No problem, hope you are feel better. thanks for appreciation :) Composer is not a case. I thought i broke something, but i was wrong, composer doesn't use orchestrator by default and it was needed only to provide configuration to composer and enable it, i have added guide how to do it in README. But i think it will be worth to add to every shot-consumer orchestrator without enable it and i will add to CI configuration steps to rerun all builds with enabling orchestration by command param ------EDIT ------EDIT |
@pedrovgs Added CI check with enabled orchestrator. Work is completely done. 🎉 If any code issues to fix, of course will fix it, waiting for comments or for merge and new version release 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done @mariuszmarzec. I'm merging this and releasing a new version right now so we can get feedback from the users 😃 Thank you so much for this contribution, you rock. If you don't mind, let me know what's your twitter account so I can announce the new release and thank you on twitter as well!
@pedrovgs Hey, happy to see new release 😄 I don't have any twitter account unfortunately, no problem if there will be no contact, i was mentioned on release notes, so it is good too 😄 |
📌 References
🎩 What is the goal?
Providing support for AndroidX Orchestrator
How is it being implemented?
Compose testing is done by one of the contributor, so we have to only ensure preserving of metadata files. According to default screenshot done by facebook it is needed to move screenshots and metadata files to another temporory dir, because in every starting test screenshot tool from facebook clears
screenshots-default
dir.How can it be tested?
To test it, it would be worth to run record and verification on projects with/without orchestrator.