2

Test Automation: Your Approach and Challenges

Profile picture
Quality Assurance/SDET Lead Engineer at Myant Healtha month ago

Is your team using test automation? If so, what's your approach to automation, and what are the main challenges you face?

I'm especially curious about: What strategies has your team implemented to tackle your challenges and make test automation more effective?

46
10

Discussion

(10 comments)
  • 1
    Profile picture
    Tech Lead @ Robinhood, Meta, Course Hero
    a month ago

    Taro's too small to have any real automation, but back at Instagram and Robinhood we mainly had a mix of these 2 things:

    • Unit tests
    • Snapshot/integration tests (snapshot tests are specific to mobile and front-end overall)

    In terms of making testing more effective, my main advice is to focus on the more "meta" mechanisms surrounding testing instead of just the test coverage itself. You can find more very detailed thoughts here (thread is mobile-focused but applies to everyone): "What do mobile testing strategies look like at top tech companies?"

    • 0
      Profile picture
      Quality Assurance/SDET Lead Engineer [OP]
      Myant Health
      a month ago

      Thanks Alex for your response. What do you mean by "meta" mechanisms?

      Here’s some additional context behind my question: In my previous roles, I worked at large organizations like TD Bank, Walmart Labs, and Shopify. I led the automation efforts in those roles, where processes were well-established and controlled. We had a dedicated automation team, and the development team also contributed by writing end-to-end (E2E) and integration tests.

      This is my first experience working in a startup, and it has been quite challenging. The startup operates in the healthcare domain and is subject to regulatory requirements, including FDA approvals, which significantly slow down the development process.

      Currently, I am leading the testing efforts for both the mobile app (built with Flutter) and the web app (built with React). Here are the primary challenges my team is facing:

      1. App Complexity:
        Our mobile app, built with Flutter, is highly complex and involves integration with a hardware device. The app communicates with the device via Bluetooth to monitor ECG and health vitals. While we have unit and widget tests in place, writing E2E tests remains a challenge. Previously, we used Flutter’s native testing tools for E2E, but we recently transitioned to Appium, which has improved our coverage.

      2. High Maintenance:
        Maintaining automation scripts demands significant time and effort. As a startup, shifting priorities and evolving app requirements make script maintenance particularly challenging.

      3. Budget Constraints:
        With a limited budget, we only have one dedicated QA resource for automation. Leveraging my experience in automation, I designed the framework and contributed to writing scripts. While I’m working to train the team to assist with automation, most of our time is consumed by urgent testing tasks, leaving little room to focus on automation initiatives.

      These challenges make it difficult to maximize automation coverage. Therefore, I decided to ask others about the challenges they are facing and the strategies they are using to overcome them.

    • 1
      Profile picture
      Tech Lead @ Robinhood, Meta, Course Hero
      17 days ago

      What do you mean by "meta" mechanisms?

      It means that it's more important to focus on the system, culture, and infrastructure surrounding the tests instead of the tests themselves.

      In concrete terms, it means that organizations looking to promote healthy automated testing shouldn't focus on something like test coverage as that's too primitive and reductive a goal.

      Instead of that, organizations should focus on things like this:

      1. Engineers getting rewarded if they write tests
      2. Engineers getting rewarded if they maintain tests (this is arguably more important than #1)
      3. Engineers being able to see the impact (i.e. volume/severity of bugs prevented) of the tests they write
      4. How easy it is to write, debug, and run a test

      I have seen so many engineering teams just force test coverage/volume as a goal and end up with a bunch of tests that are flaky and unmaintained. Test coverage being the KPI also incentivizes engineers to write tests for unimportant logic that is non-critical and not likely to break (i.e. the "easy" code). A real example of this is when I found several unit tests back at Instagram that were testing methods that were literally just null checks.

    • 0
      Profile picture
      Quality Assurance/SDET Lead Engineer [OP]
      Myant Health
      16 days ago

      Thank you so much, Alex, for your response and for explaining the "meta" mechanism. It's very insightful. I've actually witnessed how this test coverage approach can undermine automation efforts, leading to the creation of useless tests that add no real value. As you mentioned, organizations should prioritize the system, culture, and infrastructure that support testing, but unfortunately, this rarely happens.

  • 1
    Profile picture
    Software Engineer @ Verily
    a month ago

    So, some of the strategies that I have seen work well

    • Unit tests, at an interface level. Mock interfaces used by the implementation. Only public methods are called by the tests.
    • End to end test/integration test. They can also serve as canaries if run frequently.

    Other caveats

    • If you have a long rolling deploy, you will have a state where some nodes are having a new version of the code, some older. That can have some issues. Having an env where there is always a new and the previous deployed code version running is useful.
    • If you have a critical distributed system, look at deterministic simulation testing.
  • 0
    Profile picture
    Tech Lead/Manager at Meta, Pinterest, Kosei
    a month ago

    We have very minimal automated testing at Taro, but this company will be interesting for you: https://www.ycombinator.com/companies/dev-tools-ai

    I know the company through YC, and the founder Chris is a big Taro supporter. He may be a good person to talk to about making test automation more effective, especially in the age of AI.

    • 0
      Profile picture
      Quality Assurance/SDET Lead Engineer [OP]
      Myant Health
      a month ago

      Thanks Rahul. I checked the link https://dev-tools.ai/ but it's results in 403 Forbidden.