1

I'm playing with chimp testing tool. At the moment I can easily run cucumber and mocha tests. The problem is that I don't know how to add DB fixtures. I'd like to have initial data before running some tests (e.g. add test user into system).

BTW that data can be added only by authenticated user and users can be create only by admin or from server level.

Can't find any docs about this for now. Any suggestions?

Jaro
  • 926
  • 1
  • 10
  • 24

1 Answers1

0

If you are using Meteor, you can pass the DDP parameter on the command line --DDP=http://localhost:3000 and then use server.execute to run code on the server. This code can then setup data.

If you are not using Meteor, you can use a HTTP call using request.get('http://localhost:8080/addUser').

Through HTTP / DDP you can access the server and create a testing backdoor to setup the data you need.

Xolv.io
  • 2,373
  • 1
  • 12
  • 17