lovetoxso that i can run it, connect with a client
lovetoxand replay some test
lovetoxactually i would not need a full server for that, just a counter part that sends defined stanzas in a specified order
lovetoxits probably not hard to write that myself i guess, but thought i ask befor i put in any work
flowlovetox, smack's unit test have a "dummy" connection which you can feed some protocol information, so that it will send this if you send that, and so on. but I am not aware of a generic framework for this
flowwould potentially be nice to have, but then again, at some point you are doing integration tests and could as well fire up a full featured server like openfire, prosody or ejabberd
lovetoxyeah but the server would need some interface where i can execute these testcases
flowbut for unit tests it is certainly nice, but you usually do not want to leave your native programming environment when running units tests, so a generic impl for that is probably not that sensible
flowlovetox, loopback interface? or of what kind of interface are we talking about?
flowhmm we could start a joint effort for docker containers with pre-configured xmpp servers to run integration tests against
lovetoxno i imagined something like, i send a custom element after streamstart <testcase name="testcase45">
lovetoxand after that the server does something that is defined in this server testcase
lovetoxfor example send invalid xml, or abort the stream with a specific error at a specific point
flowHolger, could ejabberd do that? ↑
Link Mauvelovetox, not exactly a server, but check biboumi’s e2e tests.
Link MauveI think they do something like that.
lovetoxi just dont know if its worth to implement something like that in a real server
lovetoxits probably much work because it hooks into all kind of modules
lovetoxmaybe i need just a simple server that plays specific stanzas in a specific order i define
Link MauveYou also have the opposite, scansion, for server testing.
lovetoxhm or i simply write a testmode for nbxmpp, where nbxmpp just plays the stanzas to my client
Zashlovetox: like a reverse scansion?
lovetoxi guess what i searched was some way how i can do this with minimal work, but its either much impl on the server, or on my lib, or in my app
flowZash, no, I think he looks more for a server which behavior is configurable so that it eventually misbehaves in a predicatable way
flowZash, no, I think he looks more for a server whose behavior is configurable so that it eventually misbehaves in a predicatable way
Zashflow: so, like scansion in reverse, acting as a server instead of n clients
flowZash, ok, right in scansion you make the clients misbehave
flowZash, ok, right, in scansion you make the clients misbehave
flowZash, would it be feasible to extend scansion in such a way?
ZashIf you're lucky it'd just be changing it to accept a connection instead of initiate them, then replay the scripts there