Introducing changes to a website is the moment when the client's website is most vulnerable to errors. Many jokes shared among developers relate to implementations made before important dates. At Droptica we have developed a system that makes us not being afraid of implementations - even on Fridays ;)
Problem with implementing changes
Why implementing changes to a functioning website makes it more vulnerable to errors?
Suppose you have a ready-made website that serves hundreds of customers a day. All of its elements have been thoroughly tested and work well together. Taking such a website down in order to peacefully test new features is not an option, as it would mean losses for the website owner. At the same time, adding an element that was not previously in the system means you risk that its operation will block the existing parts. The situation can prove to be dangerous, especially if the error is not caught in time, because the implementation took place just before the weekend or holidays. There are many stories being shared around the Internet about such cases – as well as countless memes.
During implementation you need to be sure that everything has been checked and tested, and that there will be no problems with the "live" version of a website. It is a bit like an attempt to attach railway cars to a speeding train... So how is it possible that the maintenance and support team at Droptica regularly adds new functions to already existing websites without breaking them?
CodeCeption is a popular framework that allows one to create automated software tests. Using CodeCeption you can create the following tests, among others:
- unit tests
- acceptance tests
- functional tests
Thorough testing – sometimes repeated many times – of every piece of code before introducing it to the production version of a website allows you to catch errors very early and avoid delays. That is because the team does not waste time to manually test every piece of code and can focus on providing the next functionalities that the client asks for.
VisualCeption is a tool that we use for graphic tests of all websites. During the first launch, the program creates a screenshot that will be the basis for comparisons. Subsequent tests create a series of screenshots that are compared with the original. On their basis, you obtain information on the percentage of changes in comparison with the original. For example, you know whether after the introduction of changes the right proportions of an image or the size and typeface of the font were kept. This is particularly important for the websites the appearance of which is a priority.
You can read more about VisualCeption on automating tests for your projects on our blog.
With CodeCeption and VisualCeption you can be 100% sure that you have not broken anything on your website :) We provide more information about the possibilities of these useful tools in the linked entries.
Version control system and keeping the code changes
Introducing new functions, improving the old ones or removing the unnecessary or incorrect elements are all natural parts of the life cycle of every website. Websites are changing and evolving. Their code must therefore also be subject to changes. It is important to be able to track these changes and quickly restore the correct version in the case of finding any problems.
Restoring the full version of a website from a backup, while only a small element needs patching, can be tedious and time-consuming. Instead, we use the version control system (GIT) and keep all changes in the appropriate branches of the code. It has many advantages:
- It allows us to track changes in all versions of the code.
- It allows a number of developers to work on the website independently of each other.
- It provides an easy-to-modify website backup.
- It keeps the whole code in one place - there are no additional scripts being sent via e-mail or other means.
- It allows for the quick creation of test versions.
Automation of the software development and testing process has also allowed us to automate the implementation of code to the production version of a website. Sometimes calling the implementation of new changes to the production is done by literally "pressing the button" or calling one script. The team can thus send more small changes, even an everyday basis. If an error occurs, instead of looking through many lines of code in order to find the "culprit", it is much easier to pinpoint the cause of the problem. The client will obtain the function faster and will be certain that it works correctly with the rest of the website.
The process we have developed not only makes the introduction of changes safe but ensures the website remains stable even if it is being changed frequently. The right approach also allows us to quickly introduce changes, which in turn saves our clients' time and money. As a result, both the client and the team have more satisfaction from cooperation and project development. The client's website can change according to the needs of their business, achieving success with every implementation.