botium-core: Facebook docker running infinitely [HELP WANTED]

Hi!

I’m running Facebook tests with a single test case, but it is still running after an hour with no output. So I kill the process and don’t get any results.

  • Is such behaviour normal? What is your average tests duration? MacBook Pro 2015, i7
  • How the botium know that the system is running and it can start testing? Is it possible that botium will start testing the system before it’s ready?
  • Is there any timeout for this?

I tried to put process.exit call into Promise handlers after the fluent, but since the process doesn’t look like this code isn’t even executed.

  .then(() => {
    console.log('READY');
    process.exit(0);
  })
  .catch((err) => {
    console.log('ERROR: ', err);
    process.exit(1);
  });

Here is the full code:

const {
  BotDriver,
  Capabilities,
  Source,
} = require('botium-core');

function assert (expected, actual) {
  if (actual.indexOf(expected) < 0) {
    console.log(`ERROR: Expected <${expected}>, got <${actual}>`)
  } else {
    console.log(`SUCCESS: Got Expected <${expected}>`)
  }
}

const driver = new BotDriver()
  .setCapability(Capabilities.PROJECTNAME, 'System')
  .setCapability(Capabilities.CONTAINERMODE, 'docker')
  .setCapability(Capabilities.FACEBOOK_API, true)
  .setCapability(Capabilities.FACEBOOK_WEBHOOK_PORT, 8080)
  .setCapability(Capabilities.FACEBOOK_WEBHOOK_PATH, 'webhook/facebook/')
  .setCapability(Capabilities.CLEANUPTEMPDIR, false)
  .setCapabilities(Capabilities.GITBRANCH, 'develop')
  .setSource(Source.LOCALPATH, './system')
  .setCapability(Capabilities.STARTCMD, 'npm install && npm run start')
  .setEnv('NODE_TLS_REJECT_UNAUTHORIZED', 0)
  .setEnv('NODE_ENV', 'test_local');

driver.BuildFluent()
  .Start()
  .UserSaysText('Anything!')
  .WaitBotSaysText((text) => assert('Your bot is online. This is standart reply. Your message was incomming from PlatformID<3>', text))
  .Stop()
  .Clean()
  .Exec()
  .then(() => {
    console.log('READY');
  })
  .catch((err) => {
    console.log('ERROR: ', err);
  });

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 42 (20 by maintainers)

Commits related to this issue

Most upvoted comments

I added it to the top of our backlog, so it will be done by next thursday.