Teacup makes it possible to test communication protocols. The core project is not dependent on any engine, protocol or reporter, making the framework flexible and powerful.
The idea is that it should be easy to add/change/remove engines, protocols and reporters without changing any of the API's.
The core project has three main responsibilities and does not rely on any special test engine or protocol:
A big library with all the base assertions such as arrays, lists and primitives.
Interfaces such as Node, Result and Reporter.
Support for fixtures and other setup-related functionality.
The framework does not rely on any specific test engine or protocol.
It is built to be able to be easy to use, extend and maintain.
This is possible due to highly use of interfaces and almost none of the implementation classes are exposed to the public.
The core project does not know anything about the test engine or protocols implemented, which makes the project very isolated.
The project is found here:
Parent project for all engine implementations.
This project contains engine specific interfaces and base classes.
It should be easy to add support for a new engines.
By extracting repeated code as much as possible.
The project is found here:
Custom JUnit 5 engine.
This engine interacts with the Teacup core project to get fixture data, such as the current fixture and
added clients/servers.
It can be time and resource consuming to use fixtures.
Therefore this engine will change the order of the tests before executing them so that the minimal fixture
changes are required.
This is done by extending the Jupiter engine.
To use the Teacup engine, do as follows:
The project is found here:
Parent project for all protocol implementations.
This project contains protocol specific interfaces and base classes.
It should be easy to add support for a new protocols.
By extracting repeated code as much as possible.
The project is found here:
FTP/FTPS support.
There is also support for an FTP server.
This makes it possible to test FTP with the framework, both the client and the server.
Add this repository as a dependency.
The Client interface holds all the functionality that the FTP client can do.
The SecureClient interface holds all the functionality that the secure FTP client can do.
New clients can be created with the Factory class in the client package.
The SimpleServer interface holds all the functionality that the FTP server can do.
New servers can be created with the Factory class in the server package.
The project is found here:
HTTP version 1.1 and 2 support.
The framework supports asynchronously and synchronously requests.
There is also support for an HTTP/HTTPS server.
This makes it possible to test HTTP with the framework, both the client and the server.
Add this repository as a dependency.
The Simple interface holds all the functionality that the HTTP client can do.
New clients can be created with the Factory class in the client package.
The Simple interface holds all the functionality that the HTTP server can do.
New servers can be created with the Factory class in the server package.
The project is found here:
Telnet support.
There is also support for an Telnet server.
This makes it possible to test Telnet with the framework, both the client and the server.
Add this repository as a dependency.
The Client interface holds all the functionality that the Telnet client can do.
New clients can be created with the Factory class in the client package.
The Simple interface holds all the functionality that the Telnet server can do.
New servers can be created with the Factory class in the server package.
The project is found here:
This project makes it possible to save logs on disc rather than just publish on the screen.
Save the logs on disc so that they are not deleted after each test execution, no matter what test engine you are using.
Follow the steps below:
The project is found here:
This project makes it possible to save logs in a MySQL database rather than just publish on the screen.
Save the logs to a MySQL database so that they are not deleted after each test execution, no matter what test engine you are using.
Follow the steps below:
The project is found here:
Visualization web back-end. Choose between an implementation in either Java or Python.
This project is needed so that the web front-end can interact with the server side and other Teacup projects.
Follow this guide to deploy to production.
The Java project is found here:
The Python project is found here:
Web front-end.
To visualize the content from the reporters on a web page.
Deploy the application on your web server.
The project is found here:
This project makes it possible to interact with a MySQL database to be used in the report projects.
The report back-end does and should not know anything about where the data comes from. This makes it easy to switch from one database to another.
Follow the steps below:
The project is found here:
This project makes it possible to interact with a MySQL database to be used in the visualization projects.
The visualization back-end does and should not know anything about where the data comes from. This makes it easy to switch from one database to another.
Follow the steps below:
The project is found here:
Examples using the JUnit test engine.
It can be used as a reference to set up and write your first test case.
It has three dependencies:
Writing your test can be divided into three steps:
All assertions can be chained and all setters take an assertion rather than a value.
This means that statusCode and version represents assertions as well. The code could look similar to this:
statusCode = integerBuilder.isLessThan(300).isGreaterThanOrEqualTo(200).build()
version = versionBuilder.isSameAs(Version.2).build()
The project is found here: