Thank you for your detailed reply. The test cases I want to create are far more complex than the AnimationTest mentioned earlier.
With regard to AnimationTest, York built a test case to determine whether the test case was successful by comparing the screenshots of the test case with the screenshots in the correct case. If the two are the same, then the test case is successful. but some test case that should be successful failed because there are subtle differences between the pixels of the image.I think video will encounter the same problem. I've built several test cases locally for iOS based on the ideas mentioned in my first email, they worked locally. The biggest problem is the Android. As for Android emulator, there are some problems with Android emulator based on TravisCI as you mentioned, so I want to know more about Android emulator of Sauce Lab. I will spend some time to investigate Sauce Lab and really hope that SauceLab's android emulator meets our requirements. Jan Piotrowski <[email protected]> 于2019年8月13日周二 下午4:41写道: > In the context of a Cordova platform, end to end indeed means testing > if the whole CLI and script flow works - adding the platform to a > project, building the project etc. There is no real testing if what is > created works in a specific way on the UI - as a platform itself has > no UI - that comes via the app of the user or specific plugins. > > If you want to create an app with weex and see if the animation takes > a specific amount of time, SauceLabs via Appium is indeed the way to > go. You get a video recording of what your app did and can look at it > to confirm any assertions your tests passed or failed. > > I can not tell you any specific about the Android emulators on Sauce > Labs, as Cordova is currently not using it because it used to only run > tests on SauceLabs. For iOS it was simple enough to add the local > simulators, but for Android we hit several problems, see this issue > for the request to add this functionality: > https://github.com/apache/cordova-paramedic/issues/134 > > What paramedic does is described here: > https://github.com/apache/cordova-paramedic#what-does-it-do I think > you will probably want to build something like that for weex, where a > project is created, some code added like a user would write it (via a > template perhaps) and then build the app to be able to run it on > different configurations (iOS, Android, versions) and run some tests > on it. > > Paramedic is really old and flaky, so you probably do not want to base > what you create on it - but you definitely can take the general idea. > If you are interested in more details, I can write up the "flow" of > things for one of the plugins that have actual Appium tests that > confirm native behavior (unfortunately that is currently all kinds of > broken because of upgrades, so the tests are actually not in > production right now - so you can definitely do that better than > Cordova ;) ) > > J > > Am Di., 13. Aug. 2019 um 07:36 Uhr schrieb 王仁敏 <[email protected]>: > > > > > > > > Thanks for your detailed reply, and it help me a lot. I'm sorry to > reply > > >> so later , I was very busy yesterday. > > > > > > > > >> After read the document of Cordova testing, I know that you have > done a > > >> really great work about test. > > > > > > > > >> in Weex, we have also build some native Unit Tests in both iOS and > > >> Android to check if individual pieces of code produce the expected > > >> results.But as you know,in Weex,our users build their app by writing > > >> javascript code, so Unit Tests is not enough.We need e2e/Integration > > >> testing. > > > > > > > > >> for example, I want to test if the animation works as expected.the > > >> animation is (x+300,y+300,during=0.3s), > > > > > > > > >> if we use js test-framework,we can easy to simulate user input. but > we > > >> can't get the animation result.(because we should compare the view's > > >> properties with it's expected) > > > > > > if we use Native,we should firstly Create UIViewController/Activity and > > >> then Simulate user input. > > > > > > > > >> Correct me if I'm wrong.I have read the e2e test of cordova-ios and > > >> cordova-android, the e2e-test only test if project is created > successful > > >> and project is builded successful. I'm curious how you designed a > test > > >> case like this. > > > > > > > > >> After I read Sauce Lab document, I think maybe Sauce Lab is better > > >> solution than Travis CI to run android emulator-based test case. It > also > > >> provide free resource for open source project and the sauce lab can > > >> integrated into Travis CI. > > > > > > > > >> can you tell me something about ARM android emulator in Sauce Lab, > For > > >> example, the stability and the speed at which test cases are > executed. It's > > >> very important to me. > > > > > > > > >> > > > > > >> 1. Free to Apple For SauceLab: https://saucelabs.com/open-source > > > > > > 2. Travis CI with Sauce Lab: > > >> https://docs.travis-ci.com/user/sauce-connect/ > > > > > > 3. supported Android emulators: > > >> https://wiki.saucelabs.com/display/DOCS/Supported+Android+Emulators > > > > > > >
