In the quest of achieving 98% automated test, i wanted to automate the deployment of backend code to staging server in Gitlab using Cypress. Of course, the first choice would be scheduling the deployment in Gitlab itself but QA don’t have access to Gitlab deployment configurations. As an automation guy, i was curious if Cypress was able to do the job. “It should be a quick one” that’s what i thought.
So, i downloaded and installed Cypress using npm. Then, like what any newbie would do, i Googled the tutorial on Cypress and followed it. I manage to open the web, inject my user name and password. Everything seemed awesome until i saw this :
I was unable to login into Gitlab using Cypress. The error was due to unsigned SSL certificate However, when i tried manually using Google Chrome, it worked. “Meh, just another roadblock” i thought. So i Googled again hoping it should be a quick fix. After reading the first solution from Stack Overflow, i thought “Nah, there should be another solution”. As i bumped into 3 to 4 discussions, i realised what i bumped into is actually not an error, i discovered the limitation of Cypress itself.
Apparently, some external web application has extra security mechanism that makes automation test harder. Cypress was not build to test external web applications. It was build to test your own application. Therefore, such security mechanisms should be disabled in test environment. In this context, Cypress was defeated!
Don’t get me wrong, Cypress is an amazing and powerful tool for web application testing. I love it for its simplicity. What i shared here is just a limitation which i discovered like how every tool would have its own weaknesses. Now, i’l be moving on to automate the deployment using Selenium. I found some tutorials on how to workaround the SSL certification issue. If succeed, i will share in another short learning story.
Hope you learned something in this short story. If you encountered the same issue or manage to find a work around for it, feel free to share your experience with us via email@example.com. Please like and subscribe for more of my exploratory learning in Automation. Remember, the goal of learning is not only discovering what works, but also discovering those that does not work. Thank you.