Cypress.io - Great for new comers to automation skillset


(Phillipe) #1

I have been using cypress.io rather than selenium based web browser automation tools. I enjoy it because it has built-in assertion chaining and promises built in. Its a node application that can run in CI, CLI, and in GUI mode. the GUI mode has a selector tool that lets you find out what element IDs you may need. It also has a list of all the network requests and the returned value of the request. (200,400,500). Currently, it is only for chrome based browsers but they are working on cross-browser modes. I was able to get the program up and running and design 5 test suites in one day making keeping automation up to date rather easy. It supports custom commands and any normal javascript that could be used elsewhere.

It is a great resource for any person new to automation as an entry point because of its ease. The websites documentation is very helpful and there is a demo test suite that shows over 50 examples of what the tooling can do. I highly recommend it as both a learning platform and a test environment. The tool is open source but they have an optional dashboard that can keep your tests reporting in one place. Though if you connect the tool correctly to your CI program you should be able to save the created file as an artifact. Also since its node, it supports node modules. It uses mocha, so I was able to use the awesome Mochawesome test reporter.

I do not work for this company, even though I am super in love with the tool, so take what I say as a fanboy with no intention of selling the product to you, just relating my experiences entering automation through an easier path than my previous job required. As always this may not be the best tool for everyone depending on how your code looks, what type of applications you are running, and how willing a company is to use a nonstandard toolset. for our company, we use Clojure, Clojurescript, Datomic, and react with reFrame (relay clone for clojurescript) so my company has a higher tolerance for new types of software.


(Miloš) #2

Cypress is pretty good for those who are just starting to learn automation since documentation is rich and code is easy to understand and write. However, it’s still rather fresh framework so it has quite a few drawbacks like lack of cross-browser support, no native file upload, etc… In dev company I work for we recently started using it for our internal projects since it shows good potential.

Those interested in Cypress might also want to take a look at Wix/Detox E2E framework for mobile apps, once you get a good understanding of Cypress it’s not so hard to learn Detox since it’s also JavaScript based and code is similar.


(Viv) #3

Agreed, its still in it’s infancy, lacks cross browser support - unfortunately many customers still require IE support and from my understanding Cypress.io have no interest in supporting IE.

It does look promising though, looking to address many common issues found with selenium. Definitely something to keep an eye on for the future.


(Stéphane) #4

Thanks @phillipe and @vivrichards, I’m currently playing with Cypress and found it very good for writing quickly tests.
I have a question. As I know almost anything from Javascript, do you think that a newcomer needs to learn Javascript first or at the same time? What level of expertise do you need in order to be a master of cypress? I have to admit that the javascript syntax looks weird… :wink:


(Viv) #5

As with most things it’s best to keep things simple and do the minimum to meet what’s required. I don’t necessarily think you need to know JavaScript first in order to start adding value. In order to start adding value you need to understand where the value lies, things like cypress are just tools/frameworks to assist and so I’d tend to not worry to much in trying to learn JavaScript but understand what you want to check and then Google for syntax for example in JavaScript to help what you need at that point? Of course it’s just my point of view and not one size fits all :slight_smile:


(Stéphane) #6

Thanks for the answer, I’m glad to know that being an expert in Javascript is not mandatory. But sometimes you need to have the correct understanding when googling if you want to highlight the correct answer. I’ll see how it goes :wink:


(Phillipe) #7

I feel at the lowest level of automation work you don’t need to know much. The actual amount of JavaScript you use is minimal, and it tends to be repeated parts of the JavaScript framework that you may need.

To my manual [QA] engineers who want to get started with using these tools I liken it to a box that has requirements to grab something from it. It’s nof a magic box but a puzzle box and you know by asking the box something specific that you get something specific back. Asking for something less specific makes gettin something from the box that you desire difficult. So it’s lesrning how best to ask the tool for what you want. That’s the nature of apis.

JavaScript is good to learn but as others said it’s not require. Understanding logic is required. If these things are possible and I do this and get back this how do I understand what I’m viewing and what I’m viewing is correct. Cypresses kitchen sink app goes through all the functions simply and you can reuse the code for your own desires swapping out parts of the code for your own URL’s or password tokens. Also you should check out stack exchanges sqa section. There are a lot of people asking questions to learn.

Baring that doing code academies free few hour course, or picking up JavaScript in 24 hours, or freecodecamps JavaScript lessons will give you more than enough to use most java script programs


(Stéphane) #8

OK, I get it, thank you for the advices :+1: