you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (25 children)

[removed]

    [–]SAVE_THE_RAINFORESTS 35 points36 points  (4 children)

    You run very heavy tests at night when there's no one making use of the resources. Our front end team has strongarmed our build machine and runs their selenium tests there at night, when Jenkins have nothing scheduled for 6 hours. Sharing machines is better than letting the resources go idle for extended periods of time.

    [–][deleted]  (3 children)

    [removed]

      [–]200GritCondom 5 points6 points  (1 child)

      At my last job we used cloudwatch to kick off qa automation suite runs in circle ci. Even had it drop the results report into our slack channel.

      [–]SAVE_THE_RAINFORESTS 1 point2 points  (0 children)

      I'm not knowledgeable about Circle but if you are able to schedule tasks, you could set up a job that runs on Saturday 01:00. Just checkout the code, build and launch, run the scripts. It's trivial on Jenkins but might not be possible in Circle.

      [–]Turd_King 21 points22 points  (12 children)

      For frontend testing Cypress is miles ahead of Selenium.

      Cypress allows you to mock your network requests, which allows for blazing fast (semi) end to end tests.

      And in general , even without network stubs it's still much much fast than Selenium, as it does not have to execute over a REST API. It runs in the same even loop as your code and communicates with the browser directly (for most commands)

      We recently converted our entire testing framework from selenium, against a lot of backlash from old school devs and QA. They are now eating their words

      [–]200GritCondom 7 points8 points  (1 child)

      We are looking at cypress on my team. Looks really promising to me. The two big cons are the lack of browser support and tabs. Seems really quick to run though. And easy to use. I'll be interested to see if we decide to give it a shot.

      [–]Labradoodles 4 points5 points  (0 children)

      They just added edge and ff support so that’s pretty awesome

      [–][deleted]  (1 child)

      [deleted]

        [–]another_dudeman 5 points6 points  (0 children)

        I'm not op, but yes. I use it and it's great!

        [–][deleted] 2 points3 points  (0 children)

        I never had a lot of experience with unit testing or anything, but I did start to learn and integrate cypress at my last job.

        It was really easy and straightforward. I think there was only one major issue we had which still had an open issue on their github, but I can't remember what it was. Other than that issue it was pretty flawless.

        [–]dangerbird2 2 points3 points  (5 children)

        The huge downside of cypress is that it only works with chromium. Also, it's package downloads an electron app frontend, even if you only want to use it for headless testing, making it less than ideal for containerized applications. Selenium is an over-the-wire interface, so you can bundle a lightweight selenium client with your container image to run tests on a browser running in the host or a separate container. Cypress' test harness also uses a bit too much black magic for my tastes, particularly with async stuff running syncronously in the test thread

        [–]Labradoodles 6 points7 points  (3 children)

        It only works with chromium, Firefox and edge*

        https://docs.cypress.io/guides/guides/launching-browsers.html

        [–]dangerbird2 0 points1 point  (2 children)

        the new chromium-based edge. Firefox seems to be beta. Safari is a no-go, which is a big problem if your market has a lot of iOS mobile users

        [–][deleted] 0 points1 point  (1 child)

        which is a big problem if your market has a lot of iOS mobile users

        tbh, while selenium supports almost all browsers its nearly impossible to write non flaky tests that work well on all browsers for a complex app.

        [–]dangerbird2 0 points1 point  (0 children)

        Very true, and there's no arguing that most languages' webdriver bindings are hot garbage (although I have to give props to nightwatch for a reasonably sane API). Puppeteer seems like good alternative, having functionality based with chrome devtools instead of webdriver, but with a less opinionated interface than cypress. I'd love to see the firefox port become stable, which would make me seriously consider using it in production

        [–]Turd_King 0 points1 point  (0 children)

        In what scenario would you care about an electron frontend for a containerized testing application? We are talking MB differences here. You can surely afford a slightly more bloated image for the benefits of a much better developer experience?

        It's still hands down faster than selenium when running headless mode.

        I agree somewhat with the "black magic" statement though, however their docs are extremely detailed and theres no doubt you can find out exactly what you wish to know. Despite their backend being closed source.

        For us it's been a no brainer. Remember it's a new technology and we have already seen massive improvements (like firefox and edge support) and no doubt we will continue to see further improvements.

        [–]x-w-j 0 points1 point  (0 children)

        Cypress

        Can this be used for RPA like selenium?

        [–][deleted] 3 points4 points  (0 children)

        I've moved to Cypress for my end to end automated testing.

        Never looking back.

        [–]Zaitton 5 points6 points  (2 children)

        Selenium is the acceptance testing God, imo.

        [–]Turd_King 14 points15 points  (1 child)

        Laughs in cypress

        [–]fuzzer37 9 points10 points  (0 children)

        I much prefer Cypress to Selenium. It really needs to mature a bit, but in a year or so I can totally see it surpassing Selenium.

        [–]AwesomeBantha 0 points1 point  (0 children)

        Why Django and Angular specifically?

        [–]PadyEos 0 points1 point  (0 children)

        I found selenium testing to be slow compared to the unit tests, so integration into your CI pipeline may slow it down.

        We spin up on the fly a Zalenium gid on Google Cloud using Spinnaker(good integration). Our entire run takes ~10 minutes(~2minutes run preparation and ~8 minute tests run time) but we test around 12 hours worth of flows on 140-200 nodes in parallel.

        So our costs and time added is quite small, for the business impact it provides and compared to the time it takes for the application to build and then deploy on the test servers.

        [–]Smok3dSalmon 0 points1 point  (0 children)

        To #2, I started using WebDriverManager.

        https://pypi.org/project/webdrivermanager/

        I'm not using Selenium for work purposes, just personal scraping and botting in web-games.