goldbergyoni / nodejs-traffic-shadowing-tests Goto Github PK
View Code? Open in Web Editor NEWAn example of performing traffic shadowing (a.k.a tap compare) testing using Node.js
An example of performing traffic shadowing (a.k.a tap compare) testing using Node.js
Layout
This is a wireframe that outlines how the view should look like. All the images are located within the /images folder. Each car amount of messages starts with zero. Below the status panel there should be a button with the text 'Simulate'. Please put the following cars:
ferrari: 0,
fiat: 0,
skoda: 0,
alfaRomeo: 0,
vespa: 0,
tesla: 0,
audi: 0
Clicking on a car should send an update
Whenever a car is clicked, please send a POST to the server, this method already exists in the code, just call:
postEvent(carName, {
id: 1,
engine: {
temperature: 90
}
});
Only the car 'Vespa' should send the same payload but without the property 'engine' (just id)
Updating the car events count
A websocket gets a list with all the cars and their updates count so you can update the UI. This already works in the code, just apply it to all cars count. This is how the websocket message looks like:
ferrari: 0,
fiat: 0,
skoda: 0,
alfaRomeo: 0,
vespa: 0,
tesla: 0,
audi: 0
The simulate button logic
This sends messages in-behalf of all cars, every 0.5 seconds send an update message from some car, just pick a car which is not Vespa and send the POST message as described in the section 'Clicking on a car should send an update'. This is the same logic, only without the need to click on the car.
After 30 seconds send a Vespa message (no engine property)
What happens in case of error
Whenever the websocket sends payload.messageType === 'error'
then we should show the YouTube video within the status panel, this code already works - just position it within the status panel
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.