Continuous integration (CI) is a software engineering practice in which new code is integrated to existing codebase continuously. Integration testing ensures that the changes in code function as intended together with the other parts of the code. The number of tests tend to grow and at some point performing them all becomes infeasible due to limited time between consecutive test executions. Therefore, the traditional retest-all approach becomes inoperative and test optimization techniques are required. Test selection is one of those techniques and it encompasses selecting tests which are relevant to recent changes in the code.
The purpose of this thesis is to analyze existing test selection methods, and to implement an initial continuous test selection method in CI environment that reduces duration of integration testing stage and provides faster feedback. The method is aimed to be safe that no additional faults are let through the testing. The test selection is based on changes submitted to version control system (VCS), which are compared with source code file coverages of different hardware variants reported by compilers. In addition, other possible dependencies between variants and code changes are investigated. Those are related to test codes and interfaces. Now the testing of change independent variants can be ignored, and only testing change dependent variants is conducted.
At the beginning the implemented test selection method was used in a single software development branch for testing purposes. The results indicate that utilizing the method accomplished slight but statistically significant reduction of integration testing duration with significance level of 0.05. The mean of the testing duration was decreased by 15.2% and the median by 22.2%. However, the implementation still has some inaccuracies in dependency detection, and further improvements are needed to make the test selection method more efficient.