Sunday, August 7, 2016

AUTOMATION 21: Stick it under version control!

Since my last article, I've been busy getting a Github account, and putting some of the examples I've produced into repositories.

Github is a combination of version control system, with also some features of cloud storage in terms of ease of sharing and collaborating with others across the world.

There have been two reasons why I've been driven to set up a Github account,

Reason 1 - easier to share examples

I've had a couple of private comments on my blog that some of the coding examples haven't been easy to read on some smartphones.  There's obviously a limitation to what I can do there, because I use a lot of what comes "out the box" on blogger.

Hence - being able to point to code on Github is handy for people who want to try out my examples.

Reason 2 - version control really is a must for automation

I've been using this automation as a great excuse to discuss what we're doing in automation across the world.  And one very strong theme I keep hearing is "treat it like production code. Put it under version control".

If your automation uses a language, there is good solid sense to this.  A work colleague of mine told me "treat it like production - every time you touch it, make it better" and yet at the same time "be daring, but keep it clean".

Cautious coders tend to change as little as they can, and comment out parts of the code they're replacing.  This can be well meant, but over time, the code can be so filled with elements of what the code used to do, but was never cleaned up, that it becomes messy.  Messy code is harder to maintain.

The only way you can really be daring is knowing "well if I mess this up, I'll just go revert to my working backup".

Find me on Github

My code for unit testing a dice class is here.

My first Selenium test for checking web content page for the word "aardvark" is here.

My second Selenium test for entering an anonymous comment and previewing the content is here.

Extension material

Get yourself set up on Github for when you're experimenting with the automation we've done so far.  The best material I've seen for this is here.

1 comment:

  1. G club Casino Games and Online Betting

    G club The online casino site is another fun channel that will allow you to access and play online gambling, along with tracking interesting stories and interesting stories, and today we have a story. I know about eating for the sake of health, that is, eating apples. Because that Apple. It is a cold fruit that is rich in nutrition and you know that Apple. It can help to detoxify the body well for detoxification, it is a toxin removal from the body another channel.

    The apple is also help to detoxify the body as well, because the apple is rich in pectin. There is a dietary fiber that can trap cholesterol and heavy metals in our bodies, so it helps to get rid of toxins and excrete it from the intestine.

    And most importantly, you should eat organic apples that are better to me. When you know this, then do not forget to eat apple too, but wait a minute. Eating a good apple is not peeled apple, because you have a good apple is on the shell sure enough. In addition to this story, you can also keep up. More information can be found at the website. Gclub มือถือ