Course Content
Java JUnit Library. Types of Testing
Java JUnit Library. Types of Testing
Functional Testing
This working! That's the kind of phrase any developer hears after performing functional testing.
Note
We won't be able to cover functional testing in full because it requires a large, fully-fledged project to test, which we can't write right now. But in the upcoming courses, you will write your own project and be able to conduct functional testing! This chapter serves as a theoretical overview of functional testing.
Functional testing is a crucial stage in the life cycle of any development process because it tests the complete functionality of an application.
Let's look at the definition:
In general, functional testing encompasses all the testing stages we've discussed earlier. It includes Unit Testing, Integration Testing, System Testing, Regression Testing, and other types of testing because we are verifying the full functionality of the application. Therefore, all modules need to work in isolation and as a group to ensure that the application functions correctly.
Main Features of Functional Testing
- Testing According to Requirements: Functional testing is based on the requirements of the application's functionality;
- Black Box: Testing is usually conducted using the " black box " method, where the internal structure/implementation of the program is not considered;
- User Scenarios: Tests are typically based on user scenarios and real-world usage cases;
- Automation: Functional testing is often automated to increase efficiency and ensure test repeatability.
Tools for Functional Testing in Java
For functional testing, there are several different tools and methods, each of them excelling in its own way. Since functional tests need to be automated, we need to use some frameworks for this purpose. Here is a list of the most popular tools for functional testing in Java:
- JUnit: Although more commonly used for unit testing, JUnit can also be applied to functional testing;
- Selenium: A web driver for automating the testing of web applications;
- Cucumber: A tool for Behavior-Driven Development (BDD) that allows writing tests in a language close to natural language;
- TestNG: A testing framework that provides more flexible testing capabilities, including functional tests.
During your career as a programmer, you will use a wide variety of different testing tools. You will test different applications using the necessary tools for the job.
Summary
In conclusion, it can be said that functional testing is a very important stage in software development, as it encompasses all types of testing. Even when you are simply testing your method by running it in the main
class, you are already conducting a part of functional testing.
Thanks for your feedback!