CI Through Project Life Cycle
1. Stepping into an IT project
The main goal of an IT project with destination for commercial market is to create a product from which its producer will benefit. To be competitive, the product needs to meet the following requirements:
- Quick time-to-market,
- Increase in customer satisfaction,
- Ensured adaptability of the delivered solution.
The above-mentioned criteria are equally applicable to projects focused on developing services, standalone applications, embedded software, etc. Meeting final customer expectations requires continuous development which leads to continuous integration. Different aspects of continuous integration have been described in “Modeling continuous integration practice differences in industry software development”.  Although the article written by Daniel Ståhl and Jan Bosch is rich source of information, the approach to software development and testing is constantly evolving to face a more and more demanding market.
2. In the beginning, there was chaos
First words describing the origins of the world in Greek Mythology can be applied to any IT project. In the beginning, there is an idea with a general definition of goals. Through time projects become more and more specified to finally reach a point when they’re close to an evolving living organism. Project life cycle can be divided into stages, as shown in Figure 1.
For each project, life stage tests need to be focused on a different aspect to ensure that the final product meets customer requirements. How to implement Continuous Integration (CI) into the project life cycle, so it would satisfy all needs of each development stage? To answer this question, it is necessary to first understand what activities should be performed at each stage and how can CI support it.
A bunch of necessary definitions before diving into the project life cycle:
- Continuous Integration (CI) – a development practice focused on integrating each code change with a common code repository and executing a set of tests for verification purposes. The primary goal of CI is to detect issues by testing the smallest possible portions of code as often as possible.
- Shift left – an approach which allows finding and preventing defects early in the software delivery process. Quality improvement is reached by moving tasks early in the lifecycle (moving left in the project timeline). Testing needs to be performed from the earliest phases of software development. 
- Test framework – mostly a set of guidelines for creating and designing test cases. It is a conceptual part of automated testing that helps testers to use resources more efficiently. 
- Tools – mechanisms (e.g., earned value computations) applied to inputs (e.g., task results) to create outputs (e.g., a progress report)
- Process – “a series of actions bringing about a result”, while a result is a “concrete outcome.”
- Project – a specific set of activities designed to accomplish a singular goal. It has a defined beginning and end in time, and therefore limited scope and resources. [4,5]
3. CI in project life cycle
Based on Continuous Integration and Shift Left definitions, we can say that testing in a project needs to start as early as possible and must be performed even for the smallest changes.
4. Requirement Analysis
At this stage business requirements and a way to meet them are defined. Moreover, it is identified what products need to be delivered, what resources are needed and what set of skills is necessary for completing the work.
Although during the requirement analysis stage main work is performed by project managers, test architects and engineers should use this time for necessary analysis related to tools, frameworks, software development, and testing strategy. At some point, you need to decide whether to create Continuous Integration from scratch, or reuse a known solution. Tables 1, 2 and 3 present both these approaches, as well as a combination of them.
Table 1 Defining the CI chain with reuse of known solutions
Table 2 Defining the CI chain from scratch
Table 3 Defining the CI chain with new tools and frameworks, as well as process redefinition
The second activity in which engineers need to be involved is reviewing all available project related requirements. That way any limitations and bottlenecks will be discovered at the earliest stage possible and they can be properly addressed during project planning. Every time project related documentation is updated, a review session needs to be performed. Usage of static testing techniques like review, walkthrough, or inspection is quite effective when done by experienced engineers. Because static testing does not require test line or writing source code, it is also considered a cheapest way of detecting issues .
5. Requirement analysis exit point
At the end of the requirement analysis stage, you should have visibility of: project time-to-market, functionalities requested by customers, and similarities to already developed projects. Use this knowledge to predefine future Continuous Integration aspects, like:
- Potential for reuse
- Risks related to the introduction of new tools, frameworks, and processes
- CI steps
- Speed and order in which CI steps need to be created and ready to use
- Main areas on which you will need to focus during further project development
- Type and number of needed equipment
Although assumptions you will make at this stage may not be 100% accurate – they will be a good starting point for designing a phase where requirements towards Continuous Integration will be defined.
The Design stage is dedicated to defining solutions to meet requirements set by the customer. During this stage, software, hardware, and system architects decompose the assigned project into platforms and components. They define communication interfaces, hardware, and software procedures, as well as software and hardware components that are reused. At this point, the project starts to become a product. For engineers responsible for designing and future implementation of the Continuous Integration chain, this is a crucial point. This is due to the fact that based on product architecture they define the complexity of CI, the function of each step, and acceptance criteria which need to be met on each stage – from committing to releasing.
The system presented in Figure 2 has a layer structure like the ISO/OSI model, where an upper layer is creating services based on resources provided by lower layers. For that kind of architecture. Continuous Integration needs to ensure:
- A build system that allows creating software image with different versions of components on each layer.
- Independent development and verification of a single component within a single layer
An adapted concept of OpenEmbedded systems 
- Independent integration of components within a single layer
- Functional and nonfunctional verification of a single layer
- Integration of layers
- End-to-end verification of the whole system
Meeting all of the above criteria allows creating a multilevel CI chain, which thanks to testing performed from a single component level through layer integration to full system verification, ensures early issue detection and short feedback time. Functional, nonfunctional, structural, and regression tests apply to this approach. Implementation of any CI shell requires a set of tools. Those aspects are described in CI as a toolbox.
7. Testing in the design phase
In projects where both software and hardware are developed, it is a common practice to test potential solutions on a simulated target environment before the final implementation. This approach allows early detection of potential issues and choosing the most efficient solution without involvement of expensive equipment. This stage of design is often called the proof of concept phase. It is essential to remember that all defined tests and acceptance criteria must be applicable for simulator-based test environments as well as for the target product. It saves time during the implementation phase.
8. Design phase exit point
During this stage of project life cycle assumptions from the previous phase have been refined and aligned with product architecture. Based on the specification provided by architects, Continuous Integration steps have been defined along with acceptance criteria and necessary tools. It’s time to start the implementation phase.
During this phase features requested by the customer are implemented into the final product. It starts development of software, and if needed hardware. To ensure proper quality of the final product, continuous practices need to be implemented. Up till this point, work on the project related CI chain focused on analyzing requirements, tools, available frameworks, and designing a test chain to cover product architecture. Although testing was limited to static methods and manual tests, each issue found in requirement analysis or design phase was cheap to correct. Rules related to testing as early as possible and integrating smallest possible elements have been fulfilled. Transition to the implementation phase of CI should be based on plans and designs prepared in earlier phases. Along with source code development, all aspects of Continuous Integration evolve. It is essential to implement a version control system over source code and a build system at the beginning of product development – at the implementation phase. Having those two elements from the beginning allows more natural control of product development and integration into one image. Testing aspect of CI needs correlating with the speed of product implementation. Tests for product functionalities should be available before implementation of the feature to main software line – trunk. Test-driven development (TDD) allows active issue detection by confronting code implementation with tests written based on the same requirements. Scope of tests executed within CI is changing together with product development. Verification on the component level may be possible only at the beginning. While the product is under development, next levels of testing defined during the project design phase can be enabled. Figure 3 shows how Continuous Integration may evolve along with project development.
Figure 3 Project CI evolution during implementation phases
10. Implementation exit point
Project implementation stage ends when the product is delivered to the customer. From the technical point of view, it means that all required features have been turned into source code, have been tested, and have met acceptance criteria. Consecutive iterations of CI allow detecting and fixing issues in the developed product.
Maintenance – a phase, which is not in the scope of the Project Manager, but is essential for the customer and from the end user point of view. Well planned and implemented CI decreases the risk of corrections on faults revealed after delivering the final product. During maintenance more significant weight is placed on regression and finding issues related to exceptional border cases. From the customer point of view, at this stage of Project Life Cycle Continuous Integration especially the testing part is facing challenges of fast verification (with full regression) and delivering a correction to the customer.
12. CI as a toolbox
Continuous Integration as a process of automatic building and testing of code requires the use of various types of tools like a version control system, build system, automation server, test framework, and more. Remember that there is no such thing as one ultimate kit that always works for all projects, including yours. Consider the CI chain as a toolbox which needs to contain tools allowing you to get the job done.
Before selecting a specific tool, define a set of requirements that must be met by the potential solution – it helps to choose the best option for you. Below are some questions that may help you with selecting right tools for your CI:
- What is the entry level for users and administrators?
- Is it an out of the box solution or does it require an additional configuration and or update?
- Is It Open Source or Commercial?
- Is the tool commonly used or internal?
- What are purchase, deployment, and maintenance costs of the selected tool?
- Is there support available and what does it look like?
- Does the tool require a specific operating system (OS)?
- How much system resources does the tool require?
- Can it be run in a cloud environment?
- Can it be easily equipped with new functionalities?
- How many specialists familiar with the specific tool are available on the market?
It is critical not to get attached to one set of tools connected via References:
case specific interfaces because at some point you will face a situation when the CI toolbox requires reorganization. If this happens at the begging of a project, tool replacement may be done relatively easily because the number of users is rather small. The situation becomes more complicated when you are doing a significant number of commits, the CI chain is working and can’t be stopped. In this case, switching to a different tool takes some time, and it requires a transitional period when two solutions need to be supported. Before you swap tools in your CI, ensure that:
- The new solution meets all your requirements,
- The change does not cause any functional regression in CI,
- Potential time break in the CI chain is minimal,
- The new tool has potential to be further developed in the future,
- Added value (for example reduced test duration or ability to perform more complex test cases) is introduced in CI.
Although changing anything in CI is not as easy as replacing a screwdriver with a wrench, if you see that a tool has reached its limit and does not allow doing something more efficiently, you should replace it and move forward .
Continuous integration and all continuous practices have become an important area of software engineering research and practice, as well as a project management area of interest. There are developed approaches, tools, methods, and yet still CI needs to evolve to meet the need for delivering high-quality products while continually reducing time-to-market.
14. From The Authors
Dear Reader, thank you for reading this article. We hope that we have managed to bring you closer to the subject of Continuous Integration, especially how it has evolved from raw requirements into a system ensuring quality for a whole product. If you are interested in a deeper dive into CI, we strongly encourage you to study all materials from reference section.
 Ståhl, D. and Bosch, J. “Modeling continuous integration practice differences in industry software development,” Journal of Systems and Software, vol. 87, pp. 48-59, 1, 2014.
 P. Suzie. “The Product Managers‘ Guide to Continuous Delivery and DevOps, Available http://www.mindtheproduct. com/2016/02/what-the-hell-are-ci-cd-and-devops-a-cheat- sheet-for-the-rest-of-us/
 “Test Automation Framework”, [Online]. Available: https://www.techopedia.com/definition/30670/test-automa- tion-framework
 A Guide to the Project Management Body of Knowledge (PMBOK® Guide ver 6th)
 Duncan, W. R. (1993). The process of project management. Project Management Journal, ISSN: 1938-9507, 24(3), 5–10.
 Minnesota Office of Continuous Improvement, [Online]. Available: https://mn.gov/admin/continuous-improvement/ resources/projects/toolbox/
 Peregudov, O. (2018) RFSW Archeo RoadMap (adapted view), pp. 51-53, 2018
 Shahin, M., Babar, A, Zhu, L, “Continuous Integration, Delivery and Deployment: A Systematic Review on Approaches, Tools, Challenges, and Practices,” IEEE Access, ISSN 2169-3536, pp. 3909 – 3943, 2017.
 “YoctoProjectDevelopmentManual”,[Online].Availa-ble: https://www.yoctoproject.org/docs/1.8/dev-manual/ dev-manual.html#understanding-and-creating-layers
 “Certified Tester Foundation Level Syllabus”, [Online]. Available: https://www.istqb.org/downloads/send/2-foundation-level- documents/3-foundation-level-syllabus-2011.html4
 “What is “Shift Left”? Shift Left Testing Explained”, [Online]. Available: http://www.bmc.com/blogs/what-is-shift-left- shift-left-testing-explained/