Ideas for testing Helm
Testing helm is hard. This may prove to be an issue for accepting contributions, but I can deal with this if anyone actually contributes anything. It's probably possible to script helm for testing.
Hey, feel free to delete this if you don't want the clutter, but if you ever figure something out for this, let me know and maybe we can collaborate. This is something I'm definitely interested in too. I'm using buttercup for testing helm-org-rifle, but AFAIK it's practically impossible to test integration with Helm.
Now one idea I have is to use Ecukes to try sending raw keyboard input to manipulate Helm, then check the contents of windows and buffers to see if it seems to have done what I wanted, but I haven't tried this yet. It might actually work... :)
So one way would be to mock out helm... although then you are relying on your mock being correct.
I spent a while trying to automate emacs (and helm) to make a small screencast for orgnav. I have some barely function code for this. This used xdotool to send keys (I tried using idle timers within emacs to interact with helm but this didn't work too well)
Tmux is probably a better approach that xdotool to do automation, since it has far fewer dependencies.
Now one idea I have is to use Ecukes to try sending raw keyboard input to manipulate > Helm, then check the contents of windows and buffers to see if it seems to have done what I wanted, but I haven't tried this yet. dependencies.
This is largely the approach I used to test zshnip. I used tmux to push around a zsh and then took "tmux screenshots" and checked consistency.
ecukes looks kind of fun although I'm not sure I'm that much of a fan of the cucumber approach in general.
So one way would be to mock out helm... although then you are relying on your mock being correct.
Yep. buttercup has mocking tools, but like you said, how do you test the mocks? :)
ecukes looks kind of fun although I'm not sure I'm that much of a fan of the cucumber approach in general.
Me neither, really. But it does seem to have tools for sending keyboard input, so I may give it a look someday.
Thanks.