functional-tests-core
functional-tests-core copied to clipboard
Package does not exists
Hi,
I just can't load the .jar dependencies through my tests suite cause the dependency is not resolved
On the first line of my test page
import functional.tests.core.mobile.element.UIElement;
And when I launch the test with mvn clean test -P sim.iphone5.ios10
package functional.tests.core.mobile.element does not exist
I registered the .jar with mvn install:install-file
already
Hey @jeremypele Basically, you need to provide testAppName ( and testAppArchive if you are running the tests against simulator) in your config file. This means that it is expected the app to be compressed. To compress some app we use "tar" tar -czf zippedFileFullName --directory=appFolderPath appName;
If you wondering why do we need to compress apps It is because we need to store apps which we run in our CI.
On the other hand, you could give a try also to our javascript plugin https://www.npmjs.com/package/nativescript-dev-appium Let me know if you need more information or any question arise.
Hi @SvetoslavTsenov,
thanks for the answer, I managed to finally make it run on my app after a while
I already tried nativescript-dev-appium
but found it quite hard to use and not intuitive (xpath etc..).
Cant wait for you guys to write a proper documentation for functional-tests-core
:).
So far I find it really neat 👍
Hi @jeremypele,
Thank you for your feedback.
Let me elaborate a little bit more on nativescirpt-dev-appium plugin. Recently we released a new version of it 2.0.1 which has a few more methods and supports typescript (await and async) and we are about to release 3.0.0 which will be almost equivalent of functional-test-core as far as this could be possible.
Anyway, I am glad to hear that even with a few difficulties you are managing to run your test using functional-test-core. About image compassion, I will try to explain you the logic there.
- Snapshot image. This is done automatically by calling this.compareScreens() method. You can choose to pass a name of the image or leave it emptyt and rely on the automatically generated name (which is the name of the test and a counter like 2,3 ).
- Assert image. Calling the method from point 1. will snapshot the image, but if the image doesn't exist it will save the image with "_actual" suffix at the end of the name of the image. In that case, you need to approve the image ( because this is the first one and will be used as actual one) like removing "_actual" suffix from the name of the image. Also, there are a few more options like tolerance, retrying count or in other words how much time to execute image compare ( this is very useful especially when we need to wait for the animations to be completed ).
That's great news for nativescript-dev-appium
actually.
I got the feeling that it was not really maintained and there was no documentation at all, so I picked functional-test-core
but if you guys can make it an equivalent it would be awesome!
I'll keep a eye on it. Keep up the good job guys! :)
@SvetoslavTsenov Last question: Is there any command that allows to clean application-settings
through the tests? Or at least for a fresh install on ios? Thanks
Hey @jeremypele, I am not sure that I understand your scenario. Could please elaborate more on this, so that I can give you more accurate answer
On my case, I want to flush app datas on a device. I test a login scenario and after the first login, the oauth token is stored in device application settings.
On android, I can set emulatorOptions=-wipe-data
on the config file but is there any way to do the same for ios?
Hey @jeremypele, sorry for delayed answer but I was on a vacation. Let me get straight to the point. I would suggest you try this option this.device.restartApp();. If this approach doesn't help you will need to restart the simulator which basically will kill all simulators and will wipe the data of the simulator that is going to be booted. To do that you can try this: this.device.getIOSDevice().start(); Have in mind that this could take longer like 2 min.
Thanks for the solution. The downcase is that it'll cost much more time to run an entire suite..
I'll try that 👍