DevOps
Last updated
Was this helpful?
Last updated
Was this helpful?
DevOps is a set of practices that works to automate and integrate the processes between software development and IT teams, so they can build, test, and release software faster and more reliably.The term DevOps was formed by combining the words ādevelopmentā and āoperationsā. As its name suggests, it seeks to bridge the gap between development and operation teams, which historically functioned in siloes. The concept of DevOps was founded on building a culture of collaboration between teams that historically functioned in siloes.
At its essence, DevOps is a culture, a movement, a philosophy.
It's a firm handshake between development and operations that emphasizes a shift in mindset, better collaboration, and tighter integration. It unites , , , automation, and much more, to help development and operations teams be more efficient, innovate faster, and deliver higher value to businesses and customers.
3. Write the codeThe next step is to write some code that causes the test to pass. The new code written at this stage is not perfect and may, for example, pass the test in an inelegant way. That is acceptable because it will be improved and honed in Step
5.At this point, the only purpose of the written code is to pass the test. The programmer must not write code that is beyond the functionality that the test checks.
Test-driven development (TDD) is a that relies on the repetition of a very short development cycle: requirements are turned into very specific , then the code is improved so that the tests pass. This is opposed to software development that allows code to be added that is not proven to meet requirements.
1. Add a testIn test-driven development, each new feature begins with writing a test. Write a test that defines a function or improvements of a function, which should be very succinct. To write a test, the developer must clearly understand the feature's specification and requirements. The developer can accomplish this through and to cover the requirements and exception conditions, and can write the test in whatever testing framework is appropriate to the software environment. It could be a modified version of an existing test. This is a differentiating feature of test-driven development versus writing unit tests after the is written: it makes the developer focus on the requirements before writing the code, a subtle but important difference.
2. Run all tests and see if the new test failsThis validates that the is working correctly, shows that the new test does not pass without requiring new code because the required behavior already exists, and it rules out the possibility that the new test is flawed and will always pass. The new test should fail for the expected reason. This step increases the developer's confidence in the new test.
4. Run testsIf all test cases now pass, the programmer can be confident that the new code meets the test requirements, and does not break or degrade any existing features. If they do not, the new code must be adjusted until they do.5. Refactor codeThe growing code base must be regularly during test-driven development. New code can be moved from where it was convenient for passing a test to where it more logically belongs. must be removed. , , , and names should clearly represent their current purpose and use, as extra functionality is added. As features are added, method bodies can get longer and other objects larger. They benefit from being split and their parts carefully named to improve and , which will be increasingly valuable later in the . may be rearranged to be more logical and helpful, and perhaps to benefit from recognized . There are specific and general guidelines for refactoring and for creating clean code. By continually re-running the test cases throughout each refactoring phase, the developer can be confident that process is not altering any existing functionality.The concept of removing duplication is an important aspect of any software design. In this case, however, it also applies to the removal of any duplication between the test code and the production codeāfor example or strings repeated in both to make the test pass in Step 3.RepeatStarting with another new test, the cycle is then repeated to push forward the functionality. The size of the steps should always be small, with as few as 1 to 10 edits between each test run. If new code does not rapidly satisfy a new test, or other tests fail unexpectedly, the programmer should or revert in preference to excessive . helps by providing revertible checkpoints. When using external libraries it is important not to make increments that are so small as to be effectively merely testing the library itself, unless there is some reason to believe that the library is buggy or is not sufficiently feature-complete to serve all the needs of the software under development.