

Let’s see how to exercise that button using Appium. Go ahead and try it! Create New Test Casesīased on the work we did in the Components section of this quick start guide, your app switches between light and dark modes when you click a button. It’s pretty boring as far as tests go, right?īut if someone accidentally removed the logo section in, the tests would fail. This default test confirmed that when your application runs, the You.i TV logo is present. Look at the terminal you used to launch the Appium tests to see the results. If you get an error when running yarn yimac, change the app: line in the configuration file to the absolute path of your executable.įor example, /Users//git/MyApp/youi/build/osx/Debug/MyApp. You.i Platform has an Appium Driver that you can use with both simulators and real devices.Įven if you’re not familiar with Appium, it’s easy to get going.įollow this section of the tutorial to try it out. Great Job! Keep it Up With More Testsįor more information on adding Jest tests to your app, see Testing React Native Apps in the Jest docs. To learn more, see Jest Snapshot Testing. The next time you run Jest, a new snapshot will be generated and compared with the saved one.īy running this snapshot test between iterations of development, you can ensure that the structure of your Button component doesn’t change. You can find that file in _tests_/_snapshots_/button-test.js.snap. Since this is the first time you’re running it, the test generated and saved a snapshot for your button test.
