Skip to content

Dan Q

    • Articles
    • Everything
    • Notes
    • Reposts (shares)
    • Checkins (geo*)
    • Videos
    • Reviews
    • Comics
    • Tags
    • Stats
    • Subscribe
    • Blogroll
  • About
    • Semi-standard "slash pages" you might like to explore:
    • /about
    • /blank
    • /blogroll
    • /colophon
    • /contact
    • /cv
    • /license
    • /postcards
    • /privacy
    • /salary
    • /shh
    • /slashes
    • /stats
    • /subscribe
    • /where
    • Hide posts of type:
    • Choose how Dan's dressed:
    • Hair
    • T-Shirt
  • Contact
  • Podcast

Tag: testing

  • Working with an old codebase today, I moved a method from one file to another. CI was happy.

    Then I realised the method didn't have any automated tests, so I wrote one. It turns out its entire (new) file didn't have any, so my change would improve test coverage. Nice.

    But it didn't. CI complained that test coverage had dropped. Wait, what? All I did was move some code and add a unit test.

    Then I realised that the coverage analysis tool was only counting files that actually contained any tested code. By adding a test to part of a previously-untested file, that file became part of the scored codebase. Uh-oh.

    Looked deeper. Turns out the code coverage tool was also counting the test files themselves as being part of the code-under-test.

    Fixed all of the above. Code coverage score dropped by about 40%. ๐Ÿ˜ฑ

    Now I've got more work to do.

    Happy Friday. Check what your coverage tool is inspecting, folks.

    • Note
    • 1 comment
    • posted 5 June, 2026
  • Note to self: ignore search results that say to install a plugin; the absolute fastest way to send a test email from a WordPress/ClassicPress installation (assuming you're using WP-CLI) is just to run something like:

    wp eval 'wp_mail("recipient@example.com", "Test Email", "A test email from WP-CLI");'

    • Note
    • posted 1 June, 2026
  • Highlight of my workday was debugging an issue that turned out to be nothing like what the reporter had diagnosed.

    The report suggested that our system was having problems parsing URLs with colons in the pathname, suggesting perhaps an encoding issue. It wasn't until I took a deep dive into the logs that I realised that this was a secondary characteristic of many URLs found in customers' SharePoint installations. And many of those URLs get redirected. And SharePoint often uses relative URLs when it sends redirections. And it turned out that our systems' redirect handler... wasn't correctly handling relative URLs.

    It all turned into a hundred line automated test to mock SharePoint and demonstrate the problem... followed by a tiny two-line fix to the actual code. And probably the most-satisfying part of my workday!

    • Note
    • 2 comments
    • posted 28 January, 2026
  • DanQ.me in "Party Mode", with ludicrous colour patterns.

    April Features!

    The start of April's a perfect time for a "Spring refresh" of a personal website. This year, I'm enabling a handful of experimental new features; visit DanQ.me and you might randomly be selected to try one out!

    Read more (100 words)

    • Article
    • 3 comments
    • posted 31 March, 2024
  • Image representing post: Gutenberg versus Elementor - the beginners challenge

    Gutenberg versus Elementor - the beginners challenge

    Dan comments on "Gutenberg versus Elementor - the beginners challenge" and what WordPress developers might learn from it about UX.

    Read more (295 words)

    • Repost
    • of this original
    • posted 2 February, 2022
  • Image representing post: Joe's First Computer Encounter

    Joe's First Computer Encounter

    Jennifer Morrow shares a story about a user testing experience during which a serendipitous encounter taught her more than she could have expected.

    Read more (115 words)

    • Repost
    • posted 28 January, 2020
  • Diminishing returns for usability testing, as more and more users are tested. The curve bends around 5 users, which is the recommended number of test participants.

    Why You Only Need to Test with 5 Users

    Some people think that usability is very costly and complex and that user tests should be reserved for the rare web design project with a huge budget and a lavish time schedule. Not true. Elaborate usability tests are a waste of resources. The best results come from testing no more than 5 users and running โ€ฆ

    Read more (145 words)

    • Repost
    • 1 comment
    • posted 10 June, 2017

Get in Touch

I'd love to hear from you! Why not...

  • email me on blog@danq.me?
    (my spam filter is aggressive, so use a good subject line, i.e. not just "hello"; encrypt your email if you like)
  • say hi on Mastodon, where I'm @dan@danq.me?
  • send a letter or postcard to
    Dan Q, Unit 159610, PO Box 7169, Poole, BH15 9EL, UK
  • reach out some other way?
  • ยฉ Dan Q 1998-2026
  • Creative CommonsAttributionNon-Commercial except where stated (how to use)
  • powered by BloqClassicPressHTML5CSS3
  • privacy
  • Read articles, checkins, notes, reposts, and more...
  • @dan@danq.me
  • contact
  • subscribe
  • Dan Q
  • Creative Commons Attribution Non-Commercial license
  • ClassicPress
  • CSS is awesome
  • Created by a human, not by AI
  • LGBTQ+ pride flag (2018 progress variant)
  • Polyamory flag
  • Say no to Web3
  • Mastodon (it's like email... no, come back!)
  • Tested on Firefox
  • Best viewed on the Internet
  • PHP
  • Ruby
  • Debian
  • Caddy (webserver)
  • Find me on Melonland
  • Check out my GitHub
  • Three Rings - by volunteers, for volunteers, since 2002
  • I'm a fucking webmaster
  • Looks best at: any resolution!