home.social

#fastcheck — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #fastcheck, aggregated by home.social.

fetched live
  1. Property-based тестирование: как находить баги, которые вы не придумали

    Классический unit-тест — это «вход X → ожидаю Y». Вы придумали кейс, зафиксировали ожидание, поехали. Проблема в том, что баги обычно живут не в кейсах, которые вы придумали, а ровно в тех, до которых не дотянулась фантазия: пустая строка, эмодзи, дубликаты, отрицательный ноль, перевод строки внутри значения, целочисленное переполнение. Property-based testing (PBT) переворачивает подход: вы описываете свойство — утверждение, которое должно быть истинно для любого корректного входа, — а фреймворк сам генерирует сотни случайных входов и пытается это свойство опровергнуть. Нашёл контрпример — ужимает его до минимального («shrinking») и показывает вам.

    habr.com/ru/articles/1050850/

    #propertybased_testing #Hypothesis #тестирование #QA #автотесты #Python #shrinking #fastcheck

  2. 🔄 Tired of continuous testing? The concept of property-based testing promises relief: the test framework automatically covers all boundary and non-boundary cases.
    💡Curious about how it works? Check out @lars latest article. #TypeScript #fastcheck

    innoq.com/en/articles/2023/04/

  3. People often wonder if is really applicable. I started a demo example showing how to leverage against exercises coming from Cracking the Coding Interview in at github.com/dubzzz/cracking-pbt

    More demos to come (race conditions..)

  4. CW: Advent of PBT — Day 5

    🎅📅

    Wanna try with ? Everything is ready for you on codesandbox! codesandbox.io/s/advent-of-pbt

    💡 Tip: With Property Based, try to think out of the box. Don't try to generate the precise inputs expected by your functions but some data making you able to generate ins and outs at the same time. Or at least know a bit on the outs.

    👋 Today's topic: respace
    📥 Answer tonight!

    More details: dev.to/dubzzz/advent-of-pbt-20