Show HN: Traquer – Records and reproduces user's in-page behavior
github.com
github.com
How do you plan to handle the selenium replaying? Does it currently just record the x/y position of the cursor events, because if so I guess it needs playback on a browser window of the same dimensions.
I guess it may be possible to have some adaptors for cursor events which can process the clicked element for a framework, i.e. for reactJS it could pick out the classname and use that as the click target for playback in a screen size independent way.
My gut instinct was that this would mean lots of re-recording tests every time you make a change - but really that's much the case with screenshot testing or any e2e testing already! Great work!
you can check out https://github.com/nenadg/traquer/tree/master/runner which is test runner that extrapolates from saved events.
Mouse position is irrelevant in selenium cases right now. Right now I'm trying to create basic case in which recorded events would be reproduced in correct sequence, reproducing what we've done on page.
The down side is - what is collected is xpath (just because it is shorter than dom selector), xpath is absolutely vulnerable to changes so your tests will fail after F5 (in case of generated ID's whatsoever).
I need to work on this, any help is welcome :-).
Disclaimer: I worked there for 2 years (tracker + webapp).
The concept's old as dirt. Our script had to work on IE 5.5, though, so suck it kiddies. ;)
Is there an example that shows how to actually implement in a page? I'm looking through the github code and it's not immediately obvious how to embed the recorder/replay functionality.
I am poking through the source... seems like it should be pretty easy to programmatically build a stream of events to load, but I can't quite find the code that actually plays them back?
You can look at https://github.com/nenadg/traquer/blob/master/public/lib/tra... (core method).
You can find `play` function in it. `play` function calls for `eventsScheduler` that does replay part by calling actions (events) on saved objects in pre-saved time (ie. time you moved your mouse and clicked here and there).
If you have any further questions email me. I've attached my email to my hn profile.
I know the community here is very anti-tracking, but I really do like using trackers like this to improve the UX, understand what features people use and how they use them, etc.
Whole idea about this tool is just attempt to automate `some` of tester's jobs, in example - save scenario, run it again some time later, ideally automate it with selenium/jasmine.
I guess this is pretty buggy, but I already mentioned that heatmap is pretty naive, and should be taken care of sometime in future.
If you have any idea how to monetize it, I'm all ears.
Would love to see it integrated with an A/B test optimisation tool.