Skip to content

Write a functional test suite #56

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
cdunklau opened this issue Feb 6, 2020 · 0 comments
Open

Write a functional test suite #56

cdunklau opened this issue Feb 6, 2020 · 0 comments
Assignees

Comments

@cdunklau
Copy link
Contributor

cdunklau commented Feb 6, 2020

Work will be in PR #55, detailed test planning in this project

I was planning on doing it all in Twisted, but it turns out that twisted.words.service is more of a simple chat bridge (not a full-featured ircd), so it's missing a whole lot of necessary functionality. Rather than writing my own ircd (and certainly getting a lot wrong), I plan on just running it against freenode directly a local docker-based ircd/services rig that emulates freenode. This makes a lot more sense, since that's what infobob targets anyway. The plan:

  1. Target freenode. Don't bother with registered accounts for the time being, just use prefixed nicks for test clients (although eventually that will need to be handled in order to test the flip-to-account-ban behavior). There's no issue with registered accounts, because I can set up the ircd/services however I need.
  2. Write the test suite with Python 3 and the latest Twisted, and run infobob in a child process. This will obviate the need to later port the test suite, and as a bonus give some insight into potential challenges when porting infobob itself. That makes it harder to introspect the running bot, but that's goes against the point of black box testing anyway.
  3. Write a "manager" IRC client that reports test workflow events (suite and test start/end) by sending to the channel.
  4. Write a test client with facilities for event assertions... "i was kicked", "i was muted", "i got a pm", etc.
  5. Maaaaybe write a thing to scrape the web UI? This probably wouldn't need to be sophisticated, even just some terrible HTML regexing (I know, I know) might be workable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant