Nearly a decade back I wrote a lot of browser CI tests with headless chrome as well as browser stack. I loved the idea, but they just didn’t handle things being a bit outside of perfect IRL, like taking a moment longer to load etc. They ended up having a lot of waits in them, taking a long time to write and were prone to being flakey. The tests basically lacked “common sense” and it made me think that one day someone would figure out how to make them work better.

I’m wondering if there are new frameworks, workflows, startups that have made this stuff easier and better. I’m not really in tech anymore but I wouldn’t mind writing some tests if the experience was better.

  • RobotFramework is pretty nice.

    The core challenges still exist, particularly with web automation. But RobotFramework at least has much better helper methods, syntax and quality of life tools than a few years back.

    I still don’t typically see teams maintaining anything deeper than a few smoke tests, for most projects.

    Edit: I also see a decent number of folks using PlayWright pretty happily.

    Source: I consult with various dev teams on this kind of thing.

    • Paige ( paige@lemmy.ca ) OP
      link
      fedilink
      arrow-up
      2
      ·
      3 years ago

      Sounds like just a few integration tests for the core use cases is the ticket, just like before. Real unfortunate, I would have bet that by now that there would be some startup that had made an automated user that you trained to do tests with a chrome extension or something.

  • arthur ( arthur@lemmy.zip ) 
    link
    fedilink
    English
    arrow-up
    4
    ·
    3 years ago

    I think the situation has improved, but still far from perfect. Last time I used robocop and Python to build some tests. But that’s not something I use often, so there may be better options available.

  • Kache ( Kache@lemm.ee ) 
    link
    fedilink
    arrow-up
    4
    ·
    edit-2
    3 years ago

    The synchronization problem (flakiness and all the waits) is tricky to get right. Browsers are concurrent systems, and programming around one is specialized enough that many devs don’t do it well, e.g. IMO if you’re adding ad-hoc waits or nesting timeouts, you’ve already lost.