Neutrino.js
Neutrino
A neutrino (denoted by the Greek letter ν) is a lepton, an elementary particle with half-integer spin, that interacts via only the weak subatomic force and gravity. The mass of the neutrino is tiny compared to other subatomic particles.

Neutrino.js
Our end-to-end and performance testing framework.

Designed and built by The Architect...

Structure

Wireshark captures
External libraries
TBMedia and other js utils, such as Anvil APIs, OpenTok Wrappers, HLS player...
Example tools that show how to use neutrino: pub, sub, archiving, broadcast...
what about perf?

TBMedia based
Pure neutrino.js
you said TBwhat?

Yes, I did!
OTKit
Chrome's WebRTC stack
TBMedia
js wrapper
TBMedia provides a wrapper on top of the WebRTC stack, and its purpose is to recreate more accurately the browser's behaviour

Use it following these steps
- Create an OpenTokClient instance
- Invoke createSession on client
SessionId
- From this point on:
- Neutrino-based approach
- TBMedia-based approach
- Neutrino-based tests create raw classes that connect directly with the components they want to test (Anvil, Rumor, Mantis...)
- Faster and lighter... but... does not reproduce real browsers behaviour.
- TBMedia-based tests create OTKit classes that will use the WebRTC stack to create sessions and send/receive media
- Heavy-weighted (around 4 pub/sub per core)... but... can be used to model real browsers interaction with OpenTok, and reproduce real scenarios.
Why and how the two of them?
- Neutrino-based approach
- Create OpenTokSession
- Connect to it
- Create Pub/Sub
- Publish/Subscribe
Let's see the approaches
- TBMedia-based approach
- Create OTKSession
- Connect to it
- Create Pub/Sub
- Publish/Subscribe
How do I write a test?
- Write the node.js test code implementing the test functionality
- Create the json configuration files that will direct the different variations of the test
- Launch a docker container where neutrino.js will be run
Running docker
docker run -ti --net=host -v /home/fran/neutrino:/neutrino -e "OT_API_KEY=100" -e "OT_API_SECRET=19f149fdf697474f915f13de40e0ad53" -e "OT_BASE_URL=https://anvil-tbrel.opentok.com" -e "OT_SERVER_SECRET=SECRET" docker.tokbox.com/library/centos7-node12-npm bash
And then...

Unleash power
> cd /neutrino/perf
>./bin/neutrino.js tests/<suite>/<json file>
Demo time!!
- Neutrino-based test:
- pubsub
- TBMedia-based test:
- broadcast

Neutrino.js
By Francisco Javier Cano Sandoval
Neutrino.js
- 296