Accurately testing a JavaScript analytics delivery system in Rails -


i work on large rails app. have javascript feature acts general analytics data delivery system. announces general analytics data based on various page interaction events (clicks, page views, etc) framework agnostic, in that, data isn't specific what, say, google analytics wants out of box. it's general data interaction.

the idea adapter module google analytics (or other 3rd party analytics tool) can written take data produced general library, augment data fit needs of 3rd party, , send endpoint.

my question testing feature accurately.

we use rspec bulk of our testing , teaspoon our javascript unit tests. ideally i'd write feature test navigates our app, clicks on various triggering elements, , confirms general analytics data being announced correctly.

is possible, or our teaspoon tests going have suffice?

rspec integration tests can you. unfortunately it's slow way test javascript, regression testing, performance may not important, rspec feature testing job.

my rspec integration tests take 40 minutes run, run entire suite when there's work break. of course can run individual feature files quicker, they're still way slower js tests.

you can run them headlessly using poltergeist , phantomjs, faster using browser, you'll want switch browser debugging.


Comments

Popular posts from this blog

java - Static nested class instance -

c# - Bluetooth LE CanUpdate Characteristic property -

JavaScript - Replace variable from string in all occurrences -