-
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?
-
Zash
I use clix a lot for testing.
-
Zash
+ rlwrap for repeatability 😉
-
Zash
https://matthewwild.co.uk/projects/scansion/ is pretty good for making proper repeatable test cases
-
Holger
So I can easily build more or less arbitrary stanzas using clix?
-
Zash
`clix raw` is more or less an xml console, so yeah
-
Holger
(We're fine with proper tests, thanks. Just my manual testing seems like it should work in a less meh way.)
-
Zash
it also lets you use prosodys stanza building api
-
Holger
Ah yes that sounds nicer than XML.
-
Zash
With some shortcuts like `m.chat"me@jabber.org":body"Hello"`
-
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
-
Holger
Pretty much what I was looking for, thanks! I'll see whether I can get it to build then 🙂
-
flow
Holger, FWIW, Smack has a REPL
-
flow
but I thin Clix is also a good solution
-
Holger
flow, do you use it in place of an XML console for testing things manually?
-
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
-
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.
-
Zash
Kev, like scansion?
-
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_.
-
Kev
Zash: I don't know scansion, so can't comment.
-
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.
-
Holger
Ah, Sluift! I hadn't thought of that.
-
Kev
I don't have any reason to suspect it to be better than clix, though.