jdev - 2020-05-17

  1. lovetox

    hm is there some testmode on some servers

  2. lovetox

    so that i can run it, connect with a client

  3. lovetox

    and replay some test

  4. lovetox

    actually i would not need a full server for that, just a counter part that sends defined stanzas in a specified order

  5. lovetox

    its probably not hard to write that myself i guess, but thought i ask befor i put in any work

  6. flow

    lovetox, 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

  7. flow

    would 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

  8. lovetox

    yeah but the server would need some interface where i can execute these testcases

  9. flow

    but 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

  10. flow

    lovetox, loopback interface? or of what kind of interface are we talking about?

  11. flow

    hmm we could start a joint effort for docker containers with pre-configured xmpp servers to run integration tests against

  12. lovetox

    no i imagined something like, i send a custom element after streamstart <testcase name="testcase45">

  13. lovetox

    and after that the server does something that is defined in this server testcase

  14. lovetox

    for example send invalid xml, or abort the stream with a specific error at a specific point

  15. flow

    nice idea1

  16. flow

    nice idea!

  17. flow

    Holger, could ejabberd do that? ↑

  18. Link Mauve

    lovetox, not exactly a server, but check biboumi’s e2e tests.

  19. Link Mauve

    I think they do something like that.

  20. lovetox

    i just dont know if its worth to implement something like that in a real server

  21. lovetox

    its probably much work because it hooks into all kind of modules

  22. lovetox

    maybe i need just a simple server that plays specific stanzas in a specific order i define

  23. Link Mauve

    You also have the opposite, scansion, for server testing.

  24. lovetox

    hm or i simply write a testmode for nbxmpp, where nbxmpp just plays the stanzas to my client

  25. Zash

    lovetox: like a reverse scansion?

  26. lovetox

    i 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

  27. flow

    Zash, no, I think he looks more for a server which behavior is configurable so that it eventually misbehaves in a predicatable way

  28. flow

    Zash, no, I think he looks more for a server whose behavior is configurable so that it eventually misbehaves in a predicatable way

  29. Zash

    flow: so, like scansion in reverse, acting as a server instead of n clients

  30. flow

    Zash, ok, right in scansion you make the clients misbehave

  31. flow

    Zash, ok, right, in scansion you make the clients misbehave

  32. flow

    Zash, would it be feasible to extend scansion in such a way?

  33. Zash

    If you're lucky it'd just be changing it to accept a connection instead of initiate them, then replay the scripts there

  34. Zash

    Probably more work than that tho

  35. jake


  36. jake


  37. jake

    你好 你好 你好 你好 你好 你好 你好 你好 你好