Discover and read the best of Twitter Threads about #unittesting

Most recents (3)

#SoftwareTesting can be complex. ๐Ÿคฏ

Here's a mega-thread of the top 50 articles of 2022 from BrowserStack that will help you test better and faster. ๐Ÿš€

Let's begin! ๐Ÿงต
#Selenium vs #Cypress helps you identify when to use which automation framework to meet all your testing requirements.

Learn more ๐Ÿ‘‰ ow.ly/NS1o50Kr3Lh Image
Learn more about breakpoints and the popular breakpoints in a responsive design ๐Ÿ‘‰ ow.ly/YPTN50Kr3KG Image
Read 45 tweets
In unit testing, what's a unit? Is it a method? Is it a class? Is it a module? No. Let's clarify this once and for all.

In unit testing, a unit isn't an element of structure. In unit testing, a unit is an individually observable element of BEHAVIOR.

#TDD #BDD #ATDD #UnitTesting
BTW I use @mfeathers explanation that "unit tests are tests that run fast" as a possible valid (foundation/element of a) definition of the term unit test.
Stop arguing which element of structure is meant by unit. Unit does not denote an element of structure. It denotes an element of behavior.

And that shouldn't be surprising: Tests are executable specifications of required BEHAVIOR (NOT: STRUCTURE) by example.
Read 14 tweets
#UnitTesting and #TDD continue to deliver

Yesterday, I was fighting a pretty nasty bug, all the unit tests passed

I knew there was a corner case not covered by the unit tests but what was it?

Reviewing my assumptions, the key: hw was not exactly sync
Need to test for data 1/
Not aligned, I added new unit test for that assumption, of course the test failed

Now, I just needed to modify the code to make that test pass and not make the rest of the tests fail

The best part, i could work with very small and manageable arrays (instead of the 2GB array) 2/
Once all the tests passed, tested with hardware and everything just worked!

Let's see why this worked:
1) there were 35 unit tests that tested the "happy path" and some corner cases
2) I could confidently modify the code and know I would be alerted if I broke existing code
3/
Read 5 tweets

Related hashtags

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!