Slides and tutorials available from https://e-l.unifi.it/course/view.php?id=2215
Learning Objectives
Knowledge and understanding: We aim at teaching advanced techniques based on automatic testing of software, in particular, Test-Driven Development. We will deal with several aspects of testing: Unit Testing (testing a single component), Integration Testing (testing several components together) and Functional Testing (testing the user interface, both of desktop applications and web applications). With these techniques we will be able to implement quickly and safely even complex programs. Tests will also represent specifications of our software. Moreover, tests will drive the development of clean and modular components.
We will use tools for code versioning (git, both locally and socially, using Github) and for Build Automation, that is, the automatic compilation and testing of the entire application. We will use these tools for Continuous Integration, using dedicated open source servers also on the cloud (e.g., Travis-CI). All these tools will be connected together to continuously monitor software even when developed by several members of a team.
In this process we will also use tools for analyzing the code quality.
We will also use tools to virtualize the development and testing environment to make the whole process easily reproducible (e.g., Docker).
Throughout the lessons, we will use tools to increment the productivity, most of all the Eclipse IDE.
Applying knowledge and understanding: At the end, students should be able to develop with TDD technologies and to write unit, integration and functional tests and to set up a continuous integration mechanism with build automation to keep track of tests and code quality.
Prerequisites
Good knowledge of object-oriented programming and Java.
Teaching Methods
class lessons and some laboratories
Further information
Frequency of lessons and exercises: recommended but not mandatory.
Type of Assessment
The exam consists of a project to develop at home and of an oral exam.
The project is proposed by the student (or group of students) and approved by the teacher, using all the techniques shown in the course. The project should prove the skills aquired by the students in the techniques, tools and methodologies shown in the course.
The oral exam consists of questions on the project and on the subjects taught in the course.
The final grade will take into consideration the quality of the project and the answers at the oral exam.
Course program
Tools: IDE, code versioning with Git, Code review, Programming in Team, Cloud tools (Github), Continuous Integration (Jenkins and Travis), reproducibility (virtual machines, Vagrant and Docker)
TDD: Unit Test, Integration and Functional Test, BDD (Behavioral Driven Development) from specification to implementation, Code Coverage
Clean Code, tools for the analisys of code quality and metrics (Sonarqube)