Automation – The effective assistant of the project

Tram Ho

Automation – The effective assistant of the project

If there is a member who does not claim high wages every month, does not complain, works enthusiastically, accurately, and does not make mistakes when participating in the project, what will you do? Of course it will warmly welcome, right?

As long as you try a little, that member will be present. Indeed, if you do “Automation” then it will come true.

The advantage of day-to-day computers with us is to correctly implement the assigned instructions and operations. In contrast, the human advantage is flexible handling of unplanned difficult situations or creating new things.

However, ever, in the project, have you ever seen people take on “fixed work” that should be in the dominant area of ​​computers? Are you imagining the day-to-day scene clicking on the same place, entering the same letters, sometimes mistakenly entering it again and having to re-enter it from the beginning …? What if I leave this time for people to be able to carry out creative activities (this is the part that generates value) inherent in their dominant field? Also, try to imagine the peace of mind that comes when human errors are removed.

First, I want you to try to imagine, while implementing the project, creating an environment that promotes automation, where “machines do things of machines, people do human things.” will bring the same value as when we recruit a new member.

Last year, due to circumstances, I was able to develop a web application project alone within a year. In the case of having to do coding from testing to testing, from server to client, from infrastructure construction to operation and maintenance, if there is no effective “hidden” assistant “automation” then I probably couldn’t complete the task. (In Figures 1 and 2, I give an example of automation that I configured then).

screen-shot-2016-10-10-at-3-54-47-pm

Figure 1. Automation task list for web application. Most fixed tasks like build tool develop, deploy program types, backup data base, virtual environment, UT, UI test, end-to-end test on each type of environment: real environment, environment All staging is automated.

screen-shot-2016-10-10-at-3-55-10-pm

Figure 2. Part of the build pipeline in web application development. Automated tasks are called in turn and moreover, automation is done on a large thread.

There is a rule quoted in Frederick Brooks’ famous classic work “The Mythical Man-Month” which is now known as “Brook’s law”: “Adding manpower to a late software project makes it later.” “(Adding people to the software project is slowing only makes that project slower). The above part I wrote is that “will bring the same value as when we recruit a new member”, but the person you automate also follows this rule. That is, if the project falls into death march to apply automation, it is too late. However, there is no need to automate the whole from the beginning. Carry out automation from things that can be automated, doing it bit by bit. By doing so with the progress of the project, you will gradually feel the automation system that is growing together with us and becoming a trusted team member.

Automation can be applied to all activities in the project, but where to start? This depends on the situation so I can’t write a clear answer here. However, I will give you suggestions. If you are a development engineer who designs, executes and builds, automation can be done in build process, UT, if you are an engineer, you should apply to deploy, if it is a test engineer You can perform a smoke test or an automated test function. Oh, don’t you write a test unit? Those who think like that, please read the article about Narita-san’s assert first.

When thinking, consider “What to do?”, “How to do it?” So that automation can achieve the best effect (the creative part that people need to do), the name of the tool must be the main problem but in terms of the nature of automation, I would like to introduce to you some impressive tools or automation systems in 2015.

● CI Tool: Jenkins Must first mention Jenkins. This is a tool that can be used to manage most tasks automatically. It is a tool with many plugins suitable for many situations, not only automating build intergration – something that Continuous Integration aims for, but can also be used to manage jobs that run periodically, typically as backups. job in the GUI font end of the Cron command. Figure 1 / Figure 2 that I mentioned in the previous section is the Jenkins screen.

● Build language: Rake, Make, Ant, Cmake …. Build languages ​​are famous languages ​​from ancient times like Make or Ant but the language I want to recommend is Rake. Rake is implemented as an internal Ruby DSL. The advantage of using this language is that it can control the missing part of Rake’s functionality by using Ruby’s powerful write capabilities.

● Shell-script: bash script, Windows bat …

The specialized build language like Make / Rake is very convenient and powerful, but if you want to perform automation, you need to master the sh script or Bash on Unix operating system, be good at bat or wsh if it is Windows operating system . On the Web or documents that have a lot of information about these content, you just need to remember the keyword is okay.

● Simulation-related techniques: Docker, solo Chef, Puppet, Vagrant, etc. This is a very attractive field in recent years. Especially, simulating a container type is much lighter than the one that simulates the hypervisor generate Virtual Machine form without generating process at startup and the similarity is quite high compared to automation. There are also some tools that simulate container types but now, if you simulate a Linux environment, you should use Docker. Frameworks of environmental structures such as Chef solo or Puppet can also support your automation implementation.

● Framework for automating operations: Selenium, Appium, Robotium, …. The operation automation framework is mostly helpful in automating UI tests. If you automate the operation of the web application, in other words, automating the browser operation, you should use the framework called Selenium, for applications on smartphones running Android or iOS, you can use Use Appium or Robotium for example (in addition there are other options, please try to find out). While developing the Web application that I introduced in the previous section, I used Selenium to perform automation for UI test and end-to-end test. When using Selenium, I can verify the operation on different types of browsers (Firefox, Chrome, …) whenever there is a source code change.

Read here, you probably want to do automation! From this article, let’s start the fun life with automation!

ITZone via Viblo

Share the news now

Source : Viblo