Home / Companies / Sauce Labs / Blog / Post Details
Content Deep Dive

JUnit - Beyond Unit Testing: A Simple Example

Blog post from Sauce Labs

Post Details
Company
Date Published
Author
Sauce Labs
Word Count
1,640
Company Posts That Month
13
Language
English
Hacker News Points
-
Post removed?
No
Summary

In this example, JUnit is used to cover all three tiers of testing - unit tests, integration tests, and UI/acceptance tests. Unit tests are written in SauceStatusPageDecoratorTest.java, which test the messages returned by the PageDecorator, depending on the Sauce Cloud's status. Integration tests are written in IntegrationIT.java, which use Selenium 3 to automate a real browser and simulate user actions to ensure that the plugin is properly installed on Jenkins. UI/acceptance tests are also included, which verify that the plugin displays the correct message when the Sauce Labs service is up or down. The code example demonstrates how simple it is to cover all three tiers of testing in one JUnit test suite.

Trends Found in this Post

No tracked trend matches for this post yet.

Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.