henrikjernevad, to programming
@henrikjernevad@mastodon.social avatar

Why should you unit test? What should you unit test? And how much?

Today's blog post answers these questions and provides some helpful guidelines.

The post is actually a lightly edited extract of a book on unit testing that I started about 10 years ago but never finished. Still, it has aged reasonably well.

https://henko.net/blog/why-write-unit-tests/

younata, to swift
@younata@hachyderm.io avatar

Announcing swift-fakes, the beginning of standardized test doubles for Swift!

Swift Fakes aims to provide standardized implementations of common test doubles, massively improving the readability and reliability of your tests. Currently, Swift Fakes provides the Spy class, for recording calls and returning stubbed responses. But I'm aiming to expand its offerings quickly.

Please check it out! https://github.com/Quick/swift-fakes

flameeyes, to rust
@flameeyes@mastodon.social avatar

Two very different open questions for FLOSS devleopers out there.

  • What's the state of the art of C #UnitTesting frameworks? I want to start writing a bunch of unit tests for unpaper now that the refactor makes it possible (most of the code does not depend on global state so I can link it through and test behaviours.

  • Is there any decent #Rust ELF library, so I could try to reimplement the logic of my rbelf-size and cowstats from Ruby-Elf in a more reachable format.

danrot, to javascript
@danrot@mastodon.social avatar

👨‍💻 I'm building an app with as little #JavaScript as possible (only sending and receiving push notifications). I don't use any framework, and everything else is handled by the server.

❓ Now I'm wondering how to handle #testing. Does it make sense to do #UnitTesting for a few lines of JavaScript? How do you handle that? Do you only do #E2ETesting in such cases?

💭 I was already thinking about using #JSDom in #Jest, but the #HTML is generated by #Symfony, making it hard to get it in there…

qcoding, to random
@qcoding@iosdev.space avatar

In a r/SoftwareEngineering thread on " is a generalized approach not an ideal solution for all systems" I touch on why and haven't taken over.

My rebuttal boils down to this: Does the lack of XP among businesses really mean it's less effective? Or are there other reasons it hasn't spread?

Here's the middle of the thread where it gets really interesting: https://www.reddit.com/r/SoftwareEngineering/comments/165dv8k/comment/k1o6mfj/?utm_source=share&utm_medium=web2x&context=3

soltes, to dotnet Polish
@soltes@mastodon.social avatar

Doing @avaloniaui headless platform unit testing is ridiculously good 😎

image/png

soltes, to dotnet Polish
@soltes@mastodon.social avatar

Finally adding new unit tests to behavrios library using new headless app testing from @avaloniaui 11 #dotnet #unittesting

image/png

pragmaticmarg, to Java
pixel, to SwiftUI
@pixel@social.pixels.pizza avatar
ctietze, to random
@ctietze@mastodon.social avatar

#Emacs DENOTE #unittesting - YouTube https://www.youtube.com/watch?v=44_eLHxSMmo

Protesilaos discovers #ert to write unit tests.

nobodyinperson, to programming
@nobodyinperson@fosstodon.org avatar

💡 Just realised that you can use @coveragepy not only to determine your test coverage but also to find out how much of your codebase is present in your documented examples! 😁

:python:

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • thenastyranch
  • magazineikmin
  • cubers
  • InstantRegret
  • cisconetworking
  • Youngstown
  • vwfavf
  • slotface
  • Durango
  • rosin
  • everett
  • kavyap
  • DreamBathrooms
  • provamag3
  • mdbf
  • khanakhh
  • modclub
  • tester
  • ethstaker
  • osvaldo12
  • GTA5RPClips
  • ngwrru68w68
  • Leos
  • anitta
  • tacticalgear
  • normalnudes
  • JUstTest
  • All magazines