SpringBot Technology List: Testing
By Jason Wu and Tessa Holland 28 April 2020 Techies
This article summarises the testing technologies used by SpringBot and provides a list of learning resources.
Below is a list of the technologies used for testing SpringBot applications across the server and client sides.
|JUnit||JUnit is a simple framework to write repeatable tests. It is an instance of the xUnit architecture for unit testing frameworks. JUnit is used for unit and integration tests for the server-side.||Learn JUnit|
|Spring Testing||Besides the normal JUnit Tests, Spring also provides other features for integration testing to mock-run a testing server.||Introduction to Spring Testing|
|Angular Testing||Angular provides utilities like TestBed and async to make testing asynchronous code, components, directives and services easier. SpringBot uses the built-in client-side testing integration for unit testing in the client-side.||Learn Angular Testing|
|Karma||Karma is a tool which spawns a web server that executes source code against testing code for each connected browser. The results are displayed via the command line to the developer so that they can see which browsers and tests passed or failed. Angular uses Karma for client-side testing by default. The configuration can be changed based in karma.conf.js.||Learn to configure Karma|
|TestNG||TestNG is a testing framework inspired by JUnit and NUnit, but introduces functionality that makes it more powerful and easier to use. In SpringBot, TestNG is mainly used in end to end testing (Selenium Tests), to enable features such as JUnit reporting and multithreaded testing. It also has good integration with Cucumber (covered below).||Learn TestNG||TestNG Documentation|
|Cucumber||Cucumber reads executable specifications written in plain text, and validates that the software does what those specifications say. The specifications consist of multiple scenarios. Each scenario is a list of steps for Cucumber to work through. Cucumber verifies that the software conforms with the specification and generates a report indicating success or failure for each scenario. Powered by Cucumber, the test steps are easier to read and write for end to end testing.||Learn Cucumber||Guide to Cucumber|
|Selenium||Selenium is a free (open-source) automated testing framework used to validate web applications across different browsers and platforms. You can use multiple programming languages like Java, C# or Python to create Selenium test scripts. Selenium is used in end to end testing to simulate a browser to interact with.||Selenium Documentation|
|Guice||Google Guice is an open-source software framework for the Java platform released by Google under the Apache License. It provides support for dependency injection using annotations to configure Java objects. Guice allows implementation classes to be bound programmatically to an interface, then injected into constructors, methods or fields using an @Inject annotation. When more than one implementation of the same interface is needed, the user can create custom annotations that identify an implementation, then use that annotation when injecting it. SpringBot uses Guice for dependency in end to end testing (e.g. data factory and class dependency management).||Guice Documentation|