AnyEven...tClient(3)

✨ NAME ✨

AnyEvent::XMPP::TestClient β€” the XMPP Test Client for tests, bestie πŸ’…


✨ SYNOPSIS ✨

Okay so real talk, this section is literally empty in the original. Like, nothing. Zero. Nada. 🫠 No code block, no arguments, no nothing β€” so don't come for me, I'm just being honest with you.


✨ DESCRIPTION ✨

So this module is a little helper guy whose whole job is to make testing way less of a struggle. Think of it as your emotional support module. 🫢

If you wanna run the developer test suite, you gotta set the environment variable NET_XMPP2_TEST to something like this:

NET_XMPP2_TEST="test_me@your_xmpp_server.tld:secret_password"

Most of the tests are gonna try to connect two accounts, so pls pls pls pick a server that allows two connections from the same IP. No cap, that part matters. 😭


And if you also wanna run the MUC tests (peep AnyEvent::XMPP::Ext::MUC for that one, iykyk), you gotta set up the environment variable NET_XMPP2_TEST_MUC so it contains the domain of a MUC service:

NET_XMPP2_TEST_MUC="conference.your_xmpp_server.tld"

Now, if some tests are failing and you're sitting there like "girl what is happening", you can turn on the protocol debugging output by setting NET_XMPP2_TEST_DEBUG to '1':

NET_XMPP2_TEST_DEBUG=1
⚠️ NOTE: you will only see the output of this by running a single test. Just one. Not the whole suite. πŸ’€

And if one of the tests is taking longer than the preconfigured 20 seconds default timeout in your setup, you can set NET_XMPP2_TEST_TIMEOUT:

NET_XMPP2_TEST_TIMEOUT=60  # for a 1 minute timeout

🧼 CLEANING UP 🧼

Okay so if the tests went wrong somewhere, or you interrupted them mid-vibe, you might wanna delete the accounts from the server manually. After you do that, run:

perl t/z_*_unregister.t

and you're squeaky clean ✨


πŸŽ€ MANUAL TESTING πŸŽ€

If you just wanna run a single test yourself (main character energy, honestly), just execute the register test before doing so:

perl t/z_00_register.t

And then you could, eg., run:

perl t/z_03_iq_auth.t

Slay. That's it. That's the whole thing. πŸ’–


πŸ› οΈ METHODS πŸ› οΈ

new (%args)

Following arguments can be passed in %args:

(and that's genuinely where the original list ends β€” it just says that and then moves on. Not me leaving stuff out, I promise! πŸ¦‹)


πŸ‘‘ AUTHOR πŸ‘‘

Robin Redeker, "<elmex at ta-sa.org>", JID: "<elmex at jabber.org>"


Copyright 2007, 2008 Robin Redeker, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


and that's a wrap, bestie!! πŸŽ€πŸ’–βœ¨ this iconic lil page came to you from perl v5.42.2, dated 2026-02-15 β€” go forth and test responsibly πŸ¦‹πŸ’…

πŸ“¦ where this page comes from