This Is Too Simple To Be A Tip, Isn’t It?

In my automated test scripts, I always put one-line comments at the end of loops and methods that show what is closing. For example, in Ruby, it looks like this:

    puts("Waiting for delete confirmation")
    sleep(1)
  end #until
end   #click_delete_yes

It makes it just a little easier to figure out where I am in the code, and it also makes sure I close the loops and functions appropriately.

That’s so simple and obvious it can’t possibly be a helpful tip, coud it?

Comments are closed.


wordpress visitors