Sitelet https://bugbug.featurebase.app/p/loop-while-inside-tests
Skip to main content

Loop / while inside tests

With this feature, you will be able to add loops inside your tests

7 comments

Log in to comment and vote

Comments7

  • Edd L

    •

    Dec 3, 2025

    Here is our scenario for your reference:

    We require a “Repeat / Loop Until” feature. The system must allow users to repeat a block of steps until a specified condition is met — for example, repeating the block up to 20 times for user-level settings, or switching context to a random level inside an inner iframe.
    Many thanks.

    • Paweł Bylina

      Team•

      Dec 3, 2025

      Thanks for the example! We are developing if-endif conditions, so with this, repeat / until / while would be easier to implement.

  • Emmanuel Meric de Bellefon

    •

    Jul 6, 2025

    I’d use BugBug to create large datasets in preprod so that we spot performance issues before the code lands in prod.

    We just need something like “repeat 10000 times”.

    • Paweł Bylina

      Team•

      Jul 7, 2025

      I don't think this is a good idea with BugBug. It could take hours, and our limit for single test execution is 30 minutes.

  • Suryam Owku

    •

    Jan 7, 2025

    @Paweł Bylina much need feature, I guess

    • Paweł Bylina

      Team•

      Jan 8, 2025

      Could you describe your use case for better understanding?

  • George Pligoropoulos

    •

    Apr 8, 2024

    Yes @Paweł Bylinathis is very useful because now I have a specific set of steps that delete an item and we would like to repeat those steps to repeat all items. Some times the number of items are 2, others are 3 etc. depending on previous scenarios that were executed unfortunately. I know it is better to fully control the input but requires much more work.