Wednesday, 17 May 2017

Start crossbar programmatically

Objective

I am have a simple publish server (in nodejs, using autobahn.js) that receives data from a machine and then publishes it to interested subscribers.

I am currently doing integration tests and I need to know:

  • If crossbar is running, I need to test if the server is able to successfully connect to it
  • If not, I need to launch crossbar, run the previous test, and then kill crossbar

Problem

As far as I know, there is not way to either detect if crossbar is running, or to launch it from code. Furthermore my research led me to this github issue:

Which makes me believe that running integration tests with crossbar, if not impossible, needs a relative elaborated workaround.

Questions

  1. Is there a way to start and test if crossbar is running programmatically?
  2. If not, how do you perform integration tests with crossbar?


via Flame_Phoenix

No comments:

Post a Comment