Day85 of #100DaysOfCode
Hii folks 🙌
Today I will be continuing the same pathway in which we will test our own app Project: Lunch Tray app
Unit 3: Navigation
Pathway 3: Advanced navigation app Examples
https://developer.android.com/courses/android-basics-kotlin/course
Project: Lunch Tray app
We will clone that app from the GitHub in our Android Studio and set it up and then run the test cases.
The Lunch Tray project contains an “androidTest” target with several test cases: MenuContentTests
, NavigationTests
, and OrderFunctionalityTests
.
Running your tests
To run our tests, we can do one of the following:
- For a single test case, open up a test case class and click the green arrow to the left of the class declaration. We can then select the Run option from the menu. This will run all of the tests in the test case.
- Often we’ll only want to run a single test, for example, if there’s only one failing test and the other tests pass.
- If we have multiple test cases, we can also run the entire test suite. Just like running the app, we can find this option on the Run menu.
- Note that Android Studio will default to the last target that we ran (app, test targets, etc.) so if the menu still says
Run > Run ‘app’
, we can run the test target, by selectingRun > Run.
Then choose the test target from the popup menu.
That is all for Day85 ✅
Thanks for reading, See you tomorrow!