jdev - 2022-01-19


  1. Holger

    I've been working on server code for quite a few years now but never came up with a nice way to test things manually on the XMPP level. I keep typing stuff into an XML console and looking at results. I guess others have less tedious solutions? <https://code.matthewwild.co.uk/clix/> maybe?

  2. Zash

    I use clix a lot for testing.

  3. Zash

    + rlwrap for repeatability 😉

  4. Zash

    https://matthewwild.co.uk/projects/scansion/ is pretty good for making proper repeatable test cases

  5. Holger

    So I can easily build more or less arbitrary stanzas using clix?

  6. Zash

    `clix raw` is more or less an xml console, so yeah

  7. Holger

    (We're fine with proper tests, thanks. Just my manual testing seems like it should work in a less meh way.)

  8. Zash

    it also lets you use prosodys stanza building api

  9. Holger

    Ah yes that sounds nicer than XML.

  10. Zash

    With some shortcuts like `m.chat"me@jabber.org":body"Hello"`

  11. Zash

    Not much in the way of documentation I'm afraid, but peek at https://code.matthewwild.co.uk/clix/file/tip/clix/raw.lua#l54

  12. Holger

    Pretty much what I was looking for, thanks! I'll see whether I can get it to build then 🙂

  13. flow

    Holger, FWIW, Smack has a REPL

  14. flow

    but I thin Clix is also a good solution

  15. Holger

    flow, do you use it in place of an XML console for testing things manually?

  16. flow

    Holger, I use it to test things manually, but I never used it to send "raw" XML. It should be possible to do so, but the API (which in the case of an REPL becomes the CLI) could be improved

  17. Kev

    Holger: Not sure quite what you're asking, but we have an entire testing framework that can run up multiple servers and clients in a single process against an in-process virtual network that we can control as we wish and test interactions.

  18. Zash

    Kev, like scansion?

  19. Holger

    Kev, this sounds more like it's used for automated tests though? We do have something similar. What I need is just something for playing around with things _manually_.

  20. Kev

    Zash: I don't know scansion, so can't comment.

  21. Kev

    Holger: Ah. We tend to use Sluift for such stuff (Lua XMPP scripting stuff based on Swiften), depending what we're trying to do.

  22. Holger

    Ah, Sluift! I hadn't thought of that.

  23. Kev

    I don't have any reason to suspect it to be better than clix, though.