Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I probably missed it in the documentation, but how do I automate the browser with Bombadil? How do I get it to login to my app so I can test authenticated pages?

Edit: as others have said, I am having trouble figuring out how to make this work and understanding how to use it, more practical examples of that would be helpful. Looking forward to using this. Thank you!



One smartass way to answer that for the general case is: you don't. And I mean that in the same sense as "you don't write example based tests using a PBT framework". You supply independent actions through generators and have it apply them "chaotically", not strictly in sensible sequences.

That said, for things like auth, you need to do some fixed steps to get anywhere at all. I haven't added support for this yet, but as I'm envisioning it, you'd either:

a) authenticate the browser using headers or cookies that you inject into the Bombadil browser, or b) use a "custom action" (essentially a stringifed JS function) that'd perform your particular steps

Or what you could do now: add preconditions to your actions so that they'd necessarily fill out the form before anything else could be done.

Another thing we might need in Bombadil is secrets, but for now I think it's fine to inject test credentials that are plain visible text.

Please let me know if you try it out and if you need any help!


Thank you for replying, I appreciate it! I’ll reach out when I get in trouble ;)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: