Five People and Their Thoughts (Part 8)

Sharing a new batch of engaging videos from people I follow, which I hope you’ll come to like as I do:

  • Workarounds (by Alan Richardson, about workarounds, how you can use them in testing, custom-using tools, moving boilerplate to the appendix, bypassing processes that gets in the way, understanding risks and value, technical skills, and taking control of your career)
  • 100% Coverage is Too High for Apps! (by Kent Dodds, on code coverage, what it tells you, as well as what it does not tell you)
  • Open Water Swimming (by Timothy Ferriss, about fears, habits, total immersion swimming, Terry Laughlin, compressing months of conventional training into just a few days, and the power of micro-successes)
  • How To Stop Hating Your Tests (by Justin Searls, representing Test Double, on doing only three things for tests, avoiding conditionals, consistency, apparent test purpose, redundant test coverage, optimizing feedback loops, false negatives, and building better workflows)
  • Meaning of Life (by Derek Sivers, about a classic unsolvable problem, using time wisely, making good choices, making memories, the growth mindset, inherent meaning, and a blank slate)
Advertisements

Set Cucumber to Retry Tests after a Failure

This is probably old news, but I only recently found out that there is a way for Cucumber tests running in Ruby to automatically retry when they fail.

Here’s a sample failing test:

Apparently we can just add a --retry command to set the test to retry if it fails. And we can set how many times we want the test to retry. If we retry the failing test above to retry two times, with a --retry 2 command, we’ll get the following output:

It did retry the test twice, after the initial failure. Neat! 🙂

But what happens if we run the test, with the same retry command, and the test passes? Does the test run three times? Let’s see:

Good, the retry command gets ignored when the test passes.

Notes from Paulo Coelho’s “The Alchemist”

Paulo Coelho’s “The Alchemist” has been around a while but I’ve never read it before until now. It’s a short book that tells the adventure of a young Santiago in pursuit of his treasure under the pyramids of Egypt, and tries to inspire readers to do the same, to go in pursuit of their own dreams. It’s a story that has remained popular in bookstores all these years and now I understand why. Personally, however, I’ve found it to be a bit underwhelming, perhaps because the writing wasn’t to my taste.

Nevertheless, here are some interesting lines from the book:

  • That was what made traveling appeal to him – he always made new friends, and he didn’t need to spend all of his time with them. When someone sees the same people every day, as had happened with him at the seminary, they wind up becoming a part of that person’s life. And then they want the person to change. If someone isn’t what others want them to be, the others become angry. Everyone seems to have a clear idea of how other people should lead their lives, but none about his or her own.
  • “People learn, early in their lives, what is their reason for being,” said the old man, with a certain bitterness. “Maybe that’s why they give up on it so early, too.”
  • The sheep had taught him something even more important; that there was a language in the world that everyone understood, a language the boy had used throughout the time that he was trying to improve things at that shop. It was the language of enthusiasm, of things accomplished with love and purpose, and as part of a search for something believed in and desired.
  • I know why I want to get back to my flock, he thought. I understand sheep; they’re no longer a problem, and they can be good friends. On the other hand, I don’t know if the desert can be a friend, and it’s in the desert that I have to search for my treasure.
  • He still had some doubts about the decision he had made. But he was able to understand one thing; making a decision was only the beginning of things.
  • “I’m alive,” he said to the boy, as they ate a bunch of dates one night, with no fires and no moon. “When I’m eating, that’s all I think about. If I’m on the march, I just concentrate on marching. If I have to fight, it will be just as good a day to die as any other.”
  • Most people see the world as a threatening place, and, because they do, the world turns out, indeed, to be a threatening place.
  • “Everyone has his or her own way of learning things,” he said to himself. “His way isn’t the same way as mine, nor mine as his. But we’re both in search of our Personal Legends, and I respect him for that.”

 

 

Cypress and Mochawesome

A week ago I was working on a quick automation project which asks for an HTML report of the test results to go along with the scripts. It was a straightforward request, but it was something that I don’t usually generate. Personally I find test results being displayed in a terminal to be enough, but for the said task I needed a report generator. I had already decided to use Cypress for the job so I needed something that plays well with it. In their docs I found a custom reporter called Mochawesome.

To install it, I updated the package.json file inside the project directory to include the reporter:

The Cypress documentation on Reporters also said that for Mochawesome to properly work I should also install mocha as a dev dependency, so that’s what I did.

And then run npm install on the terminal to actually install the reporter.

Before running tests, there’s a tiny change we need to write on the cypress.json file inside the project directory, which tells Cypress which reporter do we want to use for generating test reports.

And we’re all set after all that. 🙂

Run Cypress tests by running cypress run --reporter mochawesomeOr if you specified a script in the package.json file the same way I did in the first photo above, just run npm test.

After running tests, we’re going to find out that a mochawesome-report directory has been added to our project directory which houses both HTML and JSON reports of the tests.

A sample HTML test report looks something like this:

Looks nice and simple and ready for archiving.

Takeaways from Derek Sivers’s “Anything You Want”

Derek Sivers, in his book titled “Anything You Want“, shares tales and lessons he’s learned when he started, built, and sold CD Baby, a global music distribution platform, for $22M (which will return to musicians after he dies). He’s an entrepreneur, but a divergent kind of entrepreneur from the ones I’m accustomed to, and I’ve grown fond of his philosophies in both business and in life. Perhaps it’s because of Seth Godin‘s influence, perhaps it’s because he’s a very slow thinker, perhaps it’s because the things he says just sounds about right.

Some favorite lines from the book:

  • Most people don’t know why they’re doing what they’re doing. They imitate others, go with the flow, and follow paths without making their own. They spend decades in pursuit of something that someone convinced them they should want, without realizing that it won’t make them happy. Don’t be on your deathbed someday, having squandered your one chance at life, full of regret because you pursued little distractions instead of big dreams. You need to know your personal philosophy of what makes you happy and what’s worth doing.
  • The key point is that I wasn’t trying to make a big business. I was just daydreaming about how one little thing would look in a perfect world. When you make a business, you get to make a little universe where you control all the laws. This is your utopia. When you make it a dream come true for yourself, it’ll be a dream come true for someone else, too.
  • Success comes from persistently improving and inventing, not from persistently doing what’s not working. We all have lots of ideas, creations, and projects. When you present one to the world and it’s not a hit, don’t keep pushing it as is. Instead, get back to improving and inventing. Present each new idea or improvement to the world. If multiple people are saying, “Wow! Yes! I need this! I’d be happy to pay you to do this!” then you should probably do it. But if the response is anything less, don’t pursue it.
  • If you’re not saying “Hell yeah!” about something, say no. When deciding whether to do something, if you feel anything less than “Wow! That would be amazing! Absolutely! Hell yeah!” then say no. When you say no to most things, you leave room in your life to throw yourself completely into that rare thing that makes you say, “Hell yeah!” We’re all busy. We’ve all taken on too much. Saying yes to less is the way out.
  • Never forget that absolutely everything you do is for your customers. Make every decision – even decisions about whether to expand the business, raise money, or promote someone – according to what’s best for your customers. If you’re ever unsure what to prioritize, just ask your customers the open-ended question, “How can I best help you now?” Then focus on  satisfying those requests. None of your customers will ask you to turn your attention to expanding. They want you to keep your attention focused on them. It’s counter-intuitive, but the way to grow your business is to focus entirely on your existing customers. Just thrill them, and they’ll tell everyone.
  • Watch out when anyone (including you) says he wants to do something big, but can’t until he raises money. It usually means the person is more in love with the idea of being big-big-big than with actually doing something useful. For an idea to get big-big-big, it has to be useful. And being useful doesn’t need funding. If you want to be useful, you can always start now, with only 1 percent of what you have in your grand vision. It’ll be a humble prototype version of your grand vision, but you’ll be in the game. You’ll be ahead of the rest, because you actually started, while others are waiting for the finish line to magically appear at the starting line.
  • Never forget why you’re really doing what you’re doing. Are you helping people? Are they happy? Are you happy? Are you profitable? Isn’t that enough?
  • We all grade ourselves by different measures:
    • For some people, it’s as simple as how much money they make. When their net worth is going up, they know they’re doing well.
    • For others, it’s how much money they give.
    • For some, it’s how many people’s lives they can influence for the better.
    • For others, it’s how deeply they can influence just a few people’s lives.
    • For me, it’s how many useful things I create, whether songs, companies, articles, websites, or anything else. If I create something that is not useful to others, it doesn’t count. But I’m also not interested in doing something useful unless it needs my creative input.
  • When you want to learn how to do something yourself, most people won’t understand. They’ll assume the only reason we do anything is to get it done, and doing it yourself is not the most efficient way. But that’s forgetting about the joy of learning and doing. Yes, it may take longer. Yes, it may be inefficient. Yes, it may even cost you millions of dollars in lost opportunities because your business is growing slower because you’re insisting on doing something yourself. But the whole point of doing anything is because it makes you happy! That’s it! You might get bigger faster and make millions if you outsource everything to the experts. But what’s the point of getting bigger and making millions? To be happy, right? In the end, it’s about what you want to be, not what you want to have. To have something (a finished recording, a business, or millions of dollars) is the means, not the end. To be something (a good singer, a skilled entrepreneur, or just plain happy) is the real point. When you sign up to run a marathon, you don’t want a taxi to take you to the finish line.

Interview Questions Template

How does your day-to-day work look like?
What do you know about software testing? How about being a scrum master?

What is your most favorite part of the work? Your least favorite?
Have you taken part in a project that you’re really proud of?

What made you decide to apply for this position?
Why not apply for a programmer job?

What three skills do you think matters most to a tester? To a scrum master?
How do you rate yourself in those skills?
What skill would you say you’ve actively pursued recently?

Are you familiar with the following?

  • Risk
  • Exploratory testing
  • Automation
  • Test-driven development
  • Behavior-driven development
  • Agile
  • Pairing
  • Retrospective

Do you have hobbies that are important enough to waste time on?
What is one of your favorite movies? A favorite book? A favorite TV series?

Do you have specific goals in mind that you want to achieve when you get this role?
In what ways do you think we can help you achieve those goals?

Do you have questions for me or for your employer?

 

(Because I’ve been scheduled to interview a number of applicants in the coming week and I often forget to ask some of the important questions when I go at it head-on, I thought I needed some sort of template I can always grab and bring)

A 7-Year Run

It’s been seven years since I got employed at the private company I currently work for. I didn’t set out to be employed for them this long but the pay was okay and there was a lot of freedom in the testing work so I stuck around. That freedom allowed for opportunities to learn and improve on the testing (and software development) craft consistently, even though there really wasn’t any in-house training available, as long as I managed myself well year in and year out. At that time, I thought that all I needed was time to train myself and so that’s what I did. I managed my tasks well, I asked people and the world wide web questions and tried their suggestions one at a time, and that pattern continues to this day.

Don’t know where to start testing? Look at what’s available, see which ones could be interesting, and then just dive right in to those. Too many things to test? Find which features are most important and start with those, not worrying too much about testing everything. Found something odd? Ask the customer whether it’s something worth exploring. Think a particular task isn’t worth doing over and over again? Automate it, if there’s really some value in automating it. Not technically savvy? There’s tons of materials out there you could study a little at a time. Something troubling the team? Ask and listen to what they have in mind. Is a certain process annoying? Find out why that is and think whether there’s something you can do about it. Bored? Do something else. Tired? Take a break. Want to get better at a particular skill? Read books and blog posts, watch webinars or take courses, and build projects with what you’ve learned. Day in and day out, the fun is in hunting for intriguing problems to solve and testing one possible solution after another. And the trick in having the most fun is in finding out what problems are worth solving for, both for your customer and for yourself.

Yes, it’s been an extraordinary seven years. I got the growth spurt that I wanted while performing valuable work on time. Now thinking about it, I’m actually not sure if there will be many years more to add to that record, but all is well because it’s been a great run.