In this movie, you'll cover JUnit rules and categories.
- View Offline
- Exercise Files
- [Voiceover] Junit test rules are means,…according to the documentation,…to provide for special checks…after a test is performed,…even allowing the check to fail a test,…to allow for setting up or tearing down resources,…used during testing,…or observing and reporting…test execution elsewhere.…In essence,…rules allow you to define code…that executes before and after unit tests.…That is,…applying additional functionality around unit tests.…This type of code,…could be accomplished with…before class and after class annotative methods,…which we explored in a previous video.…
However,…rules allow for these functions…to be shared a cross test,…versus writing test methods in each test case.…Furthermore,…as I'll show you later in this course,…test rules are used extentively,…in instrumented test…and other Android testing apparatus.…To be begin an exploration of JUnit rules,…let's create one.…Say that we wanted to send a message,…off to some Web service,…that a test was about to be executed.…And then send a second message…to that same Web service,…
AuthorJames P White
- Why unit test?
- Unit testing tools
- Local testing with JUnit
- Working with JUnit assertions, rules, and categories
- Executing instrumented tests
- Filtering tests
- Testing with UI Automator and other testing tools
Skill Level Intermediate
Foundations of UX: Usability Testingwith Chris Nodder1h 29m Beginner
1. Getting Started
2. Local Tests
3. Instrumented Tests
4. Other Android SDK Testing Tools
5. Mocking objects
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.