Comments (3)
Have you come across TestSwarm? (testswarm.com appears to be down, but you can read about it at https://github.com/jeresig/testswarm/wiki). Their opinion on headless testing:
A popular alternative to the process of launching browsers and running test suites is that of running tests in headless instances of browsers (or in browser simulations, like in Rhino). All of these suffer from a critical problem: At a fundamental level you are no longer running tests in an actual browser – and the results can no longer be guaranteed to be identical to an actual browser. Unfortunately nothing can truly replace the experience of running actual code in a real browser.
Now, TestSwarm does seem a bit Alpha (especially since the main site doesn't seem to be loading!) but it could be good if universal browser support is a priority (maybe it's not?)
The other thing to mention is the QUnit unit testing framework, which is quite nice. It's used by underscore.js - see the test/
directory. I set up some tests of my own using theirs as a starting point and it seemed very straightforward.
from d3.
My main requirement is minimal overhead during the development cycle; I should be able to run the unit tests quickly on the command line as part of the make process, so that I can run them continuously as I'm developing. The tests must be fast.
It seems reasonable to also have more comprehensive, distributed, asynchronous tests, outside the development cycle. With these you are notified later when tests fail. I put TestSwarm in that category. It'd be nice to have, but I'd prefer it in addition to the simpler headless tests.
jQuery is heavily focused on providing compatibility across browsers. D3 is not a compatibility layer. Yes, I'd like it to have universal browser support, but having tests for a single environment (such as Node/V8) would give us at least 90% of the value from testing. I'd rather have D3 focus on using the W3C standard APIs, a forward-looking approach, then get burdened with all this cross-browser nonsense. The main goal here is to support rich, interactive visualization in SVG and that's going to require a fast, modern browser regardless!
from d3.
Implemented a simple testing framework using Node & env-js. I'm tempted to look at Zombie.js, though, since I had to excise large chunks of env-js to get it to play nice. Good news is that the tests have already uncovered a few small bugs in d3.format
and Sizzle integration. :) Hooray!
from d3.
Related Issues (20)
- Zoom and click on d3 Sankey
- What does mean the sample code?
- #How to remove spaces between bar in d3.js grouped bar chart.
- d3 hierarchy: node visibility parameter to control either to show node in visualization or hide it.
- the wrong parameter name at Binning data of d3-array documentation HOT 5
- Upgrading from v3 to v7 requires additional renders for my custom gauge
- Making a non-contiguous piechart
- Transition to pie chart with 2 slices crashes HOT 1
- Adding a link towards DefinitelyTyped HOT 1
- Realtime line chart
- setting overflow direction in css causes Y-axis labels to clip the cartesian line
- How to align nodes horizontally (sequence way)
- D3-Brush not working with Angular 17
- Add Repobeats (metrics) to README HOT 1
- Custom error handling.
- d3.pointer()
- [Request] How do I put values on top of the bar chart ?
- Firefox error when calling d3.pointer inside of 'zoom' event handler
- Hover doesn't apply styles in Firefox if d3.select.raise is used.
- D3 Ported to Dart
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from d3.