Giter VIP home page Giter VIP logo

chimp's Introduction

chimp

Your development companion for doing quality, faster. For a full documentation please go to chimpjs.com.

oclif Version Downloads/week License

Usage

$ npm install -g chimp
$ chimp COMMAND
running command...
$ chimp (--version)
chimp/0.0.0-development darwin-arm64 node-v18.1.0
$ chimp --help [COMMAND]
USAGE
  $ chimp COMMAND
...

Commands

chimp create NAME

create (scaffold) a new app

USAGE
  $ chimp create NAME [-h] [-a <value>] [-g <value>]

ARGUMENTS
  NAME  name of the new app, also used as the directory

FLAGS
  -a, --appPrefix=<value>        [default: ~app] prefix that points to the sourcecode of your app
  -g, --generatedPrefix=<value>  [default: ~generated] prefix that points to the generated by chimp helper code
  -h, --help                     Show CLI help.

DESCRIPTION
  create (scaffold) a new app

EXAMPLES
  $ chimp create my-new-app

  $ chimp create my-new-app -a ~src -g ~chimp-helpers

See code: src/commands/create.ts

chimp eject

Eject from chimp. While chimp is not a runtime dependency and your project will still run after removing it, ejecting offers a cleaner development environment. While we hope you never need to eject, it is reassuring to know you have the option. If you choose to eject or are considering it, please inform us. Remember, you are always just one command away from this choice.

USAGE
  $ chimp eject [-h]

FLAGS
  -h, --help  Show CLI help.

DESCRIPTION
  Eject from chimp. While chimp is not a runtime dependency and your project will still run after removing it, ejecting
  offers a cleaner development environment. While we hope you never need to eject, it is reassuring to know you have the
  option. If you choose to eject or are considering it, please inform us. Remember, you are always just one command away
  from this choice.

EXAMPLES
  $ chimp eject

See code: src/commands/eject.ts

chimp generate

generate GraphQL code

USAGE
  $ chimp generate [-h] [-a <value>] [-g <value>] [-p <value>]

FLAGS
  -a, --appPrefix=<value>        [default: ~app] prefix that points to the sourcecode of your app
  -g, --generatedPrefix=<value>  [default: ~generated] prefix that points to the generated by chimp helper code
  -h, --help                     Show CLI help.
  -p, --modulesPath=<value>      path to the graphQL modules, only use if you are migrating an existing Apollo App and
                                 you want to use chimp only for a part of it

DESCRIPTION
  generate GraphQL code

EXAMPLES
  $ chimp generate

  $ chimp generate -a ~src -g ~chimp-helpers

See code: src/commands/generate.ts

chimp help [COMMANDS]

Display help for chimp.

USAGE
  $ chimp help [COMMANDS] [-n]

ARGUMENTS
  COMMANDS  Command to show help for.

FLAGS
  -n, --nested-commands  Include all nested commands in the output.

DESCRIPTION
  Display help for chimp.

See code: @oclif/plugin-help

chimp init

init Chimp

USAGE
  $ chimp init [-h] [-p <value>]

FLAGS
  -h, --help                 Show CLI help.
  -p, --modulesPath=<value>  [default: ./src/modules] path to the GraphQL modules.

DESCRIPTION
  init Chimp

EXAMPLES
  $ chimp init

  $ chimp init -p ./src/chimp-modules

See code: src/commands/init.ts

Updating jest.config.js after chimp init

Please manually add pathsToModuleNameMapper like so:

const { pathsToModuleNameMapper } = require("ts-jest/utils");
const { compilerOptions } = require("./tsconfig");
// ...
module.exports = {
  // ...,
  moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, {
    prefix: "<rootDir>/"
  })
}

chimp's People

Contributors

bhavesh-suvalaka avatar jmvtrinidad avatar lgandecki avatar lolezy avatar samhatoum avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chimp's Issues

Add appium support

Just like Selenium but Appium

  • Should auto download Appium
  • Should auto download Android simulator (or intelligently give instructions to in console like Meteor)
  • Should auto download iOS simulator (or intelligently give instructions to in console like Meteor)
  • Should run Appium and connect cucumberjs + webdriver to it

Also see if calaba.sh can be used here

ES2015 support

I want to use ES2015 in my test automation code (step definitions, page objects).

using page object pattern with chimp

Hello,
I'm trying to use chimpjs with page object pattern.
In my BDD spec I'd like to have something like:

this.Given(I login to app, function () {
  loginPageObject.loginToApp();
}

e.g.
loginPageObject - an object having methods available on login page
loginToApp() - a method with webdriverIO API

Could you provide an example how to do this?
Thank you.

Failure to run on Windows if package.json present

If there's a package.json in the directory node_modules\.bin\chimp --watch is run from, Chimp fails with this message:

[chimp] stderr: 'C:\Program' is not recognized as an internal or external command,
operable program or batch file.

npm install error { [Error: Command failed: C:\Windows\system32\cmd.exe /s /c "C:\Program Files\nodejs\npm install"
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
]
  killed: false,
  code: 1,
  signal: null,
  cmd: 'C:\\Windows\\system32\\cmd.exe /s /c "C:\\Program Files\\nodejs\\npm install"' }
Error in chimp init { [Error: Command failed: C:\Windows\system32\cmd.exe /s /c "C:\Program Files\nodejs\npm install"
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
]
  killed: false,
  code: 1,
  signal: null,
  cmd: 'C:\\Windows\\system32\\cmd.exe /s /c "C:\\Program Files\\nodejs\\npm install"' }

To reproduce, save the file below as package.json in some directory, then run npm install and node_modules\.bin\chimp --watch:

{
  "name": "chimp-bug",
  "devDependencies": {
    "chimp": "^0.14.0"
  }
}

npm install chimp is throwing an error

I'm getting below error when tried to install chimp.

npm http 404 https://registry.npmjs.org/xolvio/sync-webdriverio
npm ERR! 404 Not Found
npm ERR! 404
npm ERR! 404 'xolvio/sync-webdriverio' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it
npm ERR! 404 It was specified as a dependency of 'chimp'
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, or http url, or git url.

npm ERR! System Darwin 14.4.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "chimp"

IEDriverServer version

When I installed Chimp to follow the tutorial, I received an error on startup that prevented the Selenium server from installing/starting. The error was:

[selenium] [Error: Could not request headers from http://selenium-release.storage.googleapis.com/2.47/IEDriverServer_x64_2.47.1.zip: ]

I edited the chimp\lib\selenium.js file line 75, replacing: version: '2.47.1' with version: '2.47.0' and that resolved the problem.

There isn't yet a file at the Google API location referenced above.

Interactive debugging of scenarios

Would be really nice to be able to step through the tests and have the DOM available for inspection, as it can be difficult to predict the state of a page as it loads and executes its many scripts.

Using wdio.conf.js

As Chimp is using webdriver.io internally, it would be great to use wdio.conf.js you probably already have. Is there a way to pass a configuration file instead of specify everything via command line parameters?

Be less sensitive to closed windows / stale browser sessions

Hey there!
Just wanted to point a problem that i am running into a lot when working with services like Facebook that use pop-ups etc. Chimp currently is really sensitive to browser windows not being closed "correctly" etc. which is kind of annoying when you try to setup a tab-switching workflow in your tests.

To try it, just run some tests and close the browser window by hand in the middle of anything. Chimp will completely freak out and not restart anymore. IMO it should not care at all – just stop the current test run and wait for the next file change to be there for you 😉

Here is one of the logs from such an error where i have to completely restart the test-server afterwards:

[chimp][hooks] BeforeFeatures hook had error
{ [Error: Window not found. The browser window may have been closed.
Build info: version: '2.47.1', revision: '411b314', time: '2015-07-30 03:03:16'
System info: host: 'Macintosh.local', ip: '25.174.89.152', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.9.5', java.version: '1.8.0_60'
Driver info: driver.version: unknown]
  message: 'Window not found. The browser window may have been closed.\nBuild info: version: \'2.47.1\', revision: \'411b314\', time: \'2015-07-30 03:03:16\'\nSystem info: host: \'Macintosh.local\', ip: \'25.174.89.152\', os.name: \'Mac OS X\', os.arch: \'x86_64\', os.version: \'10.9.5\', java.version: \'1.8.0_60\'\nDriver info: driver.version: unknown',
  type: 'RuntimeError' }
Error: Window not found. The browser window may have been closed.
  at Object.Future.wait (/Users/dominik/.meteor/packages/xolvio_cucumber/.0.14.1.1kokaqw++os.osx.x86_64+web.browser+web.cordova/npm/node_modules/chimp/node_modules/fibers/future.js:420:15)
  at Object.timeoutsAsyncScriptSync (/Users/dominik/.meteor/packages/xolvio_cucumber/.0.14.1.1kokaqw++os.osx.x86_64+web.browser+web.cordova/npm/node_modules/chimp/node_modules/xolvio-sync-webdriverio/node_modules/xolvio-fiber-utils/index.js:48:19)
  at initBrowser (/Users/dominik/.meteor/packages/xolvio_cucumber/.0.14.1.1kokaqw++os.osx.x86_64+web.browser+web.cordova/npm/node_modules/chimp/lib/cucumberjs/hooks.js:91:15)
  at /Users/dominik/.meteor/packages/xolvio_cucumber/.0.14.1.1kokaqw++os.osx.x86_64+web.browser+web.cordova/npm/node_modules/chimp/lib/cucumberjs/hooks.js:119:7
  at /Users/dominik/.meteor/packages/xolvio_cucumber/.0.14.1.1kokaqw++os.osx.x86_64+web.browser+web.cordova/npm/node_modules/chimp/lib/cucumber-wrapper.js:116:43

    - - - - -
Build info: version: '2.47.1', revision: '411b314', time: '2015-07-30 03:03:16'
System info: host: 'Macintosh.local', ip: '25.174.89.152', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.9.5', java.version: '1.8.0_60'
Driver info: driver.version: unknown
  at new ErrorHandler.RuntimeError (/Users/dominik/.meteor/packages/xolvio_cucumber/.0.14.1.1kokaqw++os.osx.x86_64+web.browser+web.cordova/npm/node_modules/chimp/node_modules/xolvio-sync-webdriverio/node_modules/webdriverio/lib/utils/ErrorHandler.js:92:12)
  at RequestHandler.<anonymous> (/Users/dominik/.meteor/packages/xolvio_cucumber/.0.14.1.1kokaqw++os.osx.x86_64+web.browser+web.cordova/npm/node_modules/chimp/node_modules/xolvio-sync-webdriverio/node_modules/webdriverio/lib/utils/RequestHandler.js:138:25)
  at Request.self.callback (/Users/dominik/.meteor/packages/xolvio_cucumber/.0.14.1.1kokaqw++os.osx.x86_64+web.browser+web.cordova/npm/node_modules/chimp/node_modules/xolvio-sync-webdriverio/node_modules/webdriverio/node_modules/request/request.js:373:22)
  at Request.emit (events.js:98:17)
  at Request.<anonymous> (/Users/dominik/.meteor/packages/xolvio_cucumber/.0.14.1.1kokaqw++os.osx.x86_64+web.browser+web.cordova/npm/node_modules/chimp/node_modules/xolvio-sync-webdriverio/node_modules/webdriverio/node_modules/request/request.js:1318:14)
  at Request.emit (events.js:117:20)
  at IncomingMessage.<anonymous> (/Users/dominik/.meteor/packages/xolvio_cucumber/.0.14.1.1kokaqw++os.osx.x86_64+web.browser+web.cordova/npm/node_modules/chimp/node_modules/xolvio-sync-webdriverio/node_modules/webdriverio/node_modules/request/request.js:1266:12)
  at IncomingMessage.emit (events.js:117:20)
  at _stream_readable.js:944:16
  at process._tickDomainCallback (node.js:492:13)

[chimp] Finished running async processes with errors
[chimp] run complete with errors Cucumber steps failed
[chimp] Could not get Cucumber Results from run result:
[ undefined, [ null ] ]
[xolvio:cucumber] Bad response from Chimp server.
{ statusCode: 200,
  content: '',
  headers: 
   { 'content-type': 'application/json; charset=utf-8',
     'cache-control': 'no-cache',
     'content-length': '0',
     date: 'Sun, 27 Sep 2015 12:09:36 GMT',
     connection: 'keep-alive' },
  data: null }

Rewrite the Cucumber hooks & world in TDD

When we first started chimp, this aspect was an experiment.

Now we know a lot more about what we need from cukes so we should rewrite this section with proper testing

Monkey patch DDP callbacks to bubble up errors to Cucumber

currently you have to write:

this.Given(/^I have created a settings file with the title "([^"]*)"$/, function (title, callback) {
  this.ddp.call('updateTitle', [title], function(err, res) {
    if (err) { 
      callback.fail(err);
    } else {
      callback();
    }
  });
});

This would be much cleaner this way:

  this.ddp.call('updateTitle', [title], callback);

And can be achieved by monkey-patching global.ddp.call

"undefined is not a function" error whenever try to use any WebDriverIO .then() function, specifically with client.execute(...).then()

First, apologies if this turns out to be a n00b error, but I've been unable to solve this ever since I started using Chimp, which is a really great tool!

I'm using Windows 10 and installed the latest version of chimp today (Sep 24, 2015) for this test case (npm install chimp) and when running I get this error:

> .\node_modules\.bin\chimp
[chimp] Running...

Feature: Test case for trying to use .then results in error.

  As a human
  I want to be able to use .then()


  Scenario:                                                       # features\why_is_client_execute_then_not_working_test_case.feature:6
    Given I have visited https://github.com/xolvio/chimp          # features\why_is_client_execute_then_not_working_test_case.feature:7
    When I try to use .then() I get an error in the chimp console # features\why_is_client_execute_then_not_working_test_case.feature:8
      TypeError: undefined is not a function
        at World.<anonymous> (features\support\step_defs.js:12:24)




(::) failed steps (::)

TypeError: undefined is not a function
  at World.<anonymous> (features\support\step_defs.js:12:24)


Failing scenarios:
features\why_is_client_execute_then_not_working_test_case.feature:6 # Scenario:

1 scenario (1 failed)
2 steps (1 failed, 1 passed)

[chimp] Finished running async processes with errors
[chimp] run complete with errors Cucumber steps failed
Error in chimp init Cucumber steps failed

The error above occurs with this code, line 12 is the line that has .then():

File: step_defs.js

module.exports = function() {
    this.Given(/^I have visited https:\/\/github\.com\/xolvio\/chimp$/, function () {
        client.url("https://github.com/xolvio/chimp");

    });

    this.When(/^I try to use \.then\(\) I get an error in the chimp console$/, function () {
        // Example code from http://webdriver.io/api/protocol/execute.html
        client.execute(function(a, b, c, d) {
            // browser context - you may not access neither client nor console
            return a + b + c + d;
        }, 1, 2, 3, 4).then(function(ret) {
            // node.js context - client and console are available
            console.log(ret.value); // outputs: 10
        });
    });

};

File: why_is_client_execute_then_not_working_test_case.feature

Feature: Test case for trying to use .then results in error.

  As a human
  I want to be able to use .then()

    Scenario:
    Given I have visited https://github.com/xolvio/chimp
    When I try to use .then() I get an error in the chimp console    

Let me know if there's any more information you need. I would really like to figure out why I'm unable to use .then() at all.

In case it helps, here's the output from "npm install chimp" and then in case it provides any helpful info:

> npm install chimp
npm WARN optional dep failed, continuing [email protected]
npm WARN deprecated [email protected]: package renamed to "urijs" (lower-case), please update accordingly
-
> [email protected] install C:\Users\elofgren\Desktop\temp\chimp_install_test\node_modules\chimp\node_modules\fibers
> node build.js || nodejs build.js

`win32-x64-v8-3.28` exists; testing
Binary is fine; exiting
[email protected] node_modules\chimp
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected]
├── [email protected] ([email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected])
├── [email protected]
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
└── [email protected]

Any help or pointers are appreciated, thanks!

Allow the user to specify a BeforeFeatures and AfterFeatures hook

Currently Cucumber can only have one BeforeFeatures and one AfterFeatures hook. Because Chimp uses them, the user cannot specify one.

Also the Chimp BeforeFeatures hook should be executed before the user registered hooks.
The Chimp AfterFeatures hook should be executed after the user registered hooks.

Error Running Internet Explorer Driver

{ [Error: The best matching driver provider org.openqa.selenium.edge.EdgeDriver
can't create a new driver instance for Capabilities [{rotatable=true, locationCo
ntextEnabled=true, name=, loggingPrefs=org.openqa.selenium.logging.LoggingPrefer
ences@49f264be, browserName=IE, javascriptEnabled=true, handlesAlerts=true, vers
ion=, platform=ANY, requestOrigins={name=webdriverio, version=3.2.1, url=http://
webdriver.io}}]
Build info: version: '2.47.1', revision: '411b314', time: '2015-07-30 03:03:16'
System info: host: 'MBP-WINDOWS', ip: '172.16.66.130', os.name: 'Windows 7', os.
arch: 'amd64', os.version: '6.1', java.version: '1.8.0_60'
Driver info: driver.version: unknown]

I can successfully test against Chrome and Firefox

BrowserStack and Sauce Labs session-managers

Are there any plans to add logic to the session-manager so that non-localhost sessions would be properly closed out?

For example, when I run a Sauce Labs session, the session will eventually just timeout and that shows as a failed test - at least in the bit that I've been playing with things. BrowserStack at least shows it as a "timeout" status.

Boilerplate Feature generator

chimp create feature hello

would create:

./features/hello.feature
./features/step_definitions/hello.js (or --coffee)

seems a little similar to git flow feature start MYFEATURE - hmmmm 😎

events.js:72 [throw er; // Unhandled 'error' event]

This was my commands to update meteor:

➜  gdd git:(cucumber) meteor refresh 
➜  gdd git:(cucumber) meteor update 
This project is already at Meteor 1.2.0.1, the latest release.

Changes to your project's package version selections from updating package versions:

xolvio:cucumber  upgraded from 0.13.8 to 0.14.1


The following top-level dependencies were not updated to the very latest version available:
 * natestrauser:select2 3.5.1 (4.0.0_1 is available)

Newer versions of the following indirect dependencies are available:
 * babrahams:editable-json 0.4.3 (0.6.0 is available)
 * meteorhacks:aggregate 1.2.1 (1.3.0 is available)
 * percolate:velocityjs 1.1.0 (1.2.1_1 is available)
 * practicalmeteor:chai 1.9.2_3 (2.1.0_1 is available)
 * practicalmeteor:loglevel 1.1.0_3 (1.2.0_2 is available)
 * softwarerero:accounts-t9n 1.0.9 (1.1.4 is available)
To update one or more of these packages, pass their names to `meteor update`.
➜  gdd git:(cucumber) ✗ export VELOCITY_DEBUG=1
➜  gdd git:(cucumber) ✗ meteor
[[[[[ ~/Documents/workspace/gettydata/gdd ]]]]]

=> Started proxy.                             
=> Started MongoDB.                           
I20150924-17:41:29.605(-3)? [velocity] adding velocity core
I20150924-17:41:29.608(-3)? [xolvio:cucumber] Cucumber hub is loading
I20150924-17:41:29.608(-3)? [velocity] Register framework cucumber with regex ^tests/cucumber/((?!node_modules/).)+\.(feature|js|coffee|litcoffee|coffee\.md)$
I20150924-17:41:32.222(-3)? [velocity] Server startup
I20150924-17:41:32.224(-3)? [velocity] app dir /Users/thiagoassis/Documents/workspace/gettydata/gdd
I20150924-17:41:32.225(-3)? [velocity] config = {
I20150924-17:41:32.225(-3)?   "cucumber": {
I20150924-17:41:32.225(-3)?     "regex": "^tests/cucumber/((?!node_modules/).)+\\.(feature|js|coffee|litcoffee|coffee\\.md)$",
I20150924-17:41:32.225(-3)?     "name": "cucumber",
I20150924-17:41:32.225(-3)?     "_regexp": {}
I20150924-17:41:32.225(-3)?   }
I20150924-17:41:32.226(-3)? }
I20150924-17:41:32.226(-3)? [velocity] resetting the world
I20150924-17:41:32.228(-3)? [velocity] frameworks with disable auto reset: []
I20150924-17:41:32.247(-3)? [velocity] Add paths to watcher [ '/Users/thiagoassis/Documents/workspace/gettydata/gdd/tests' ]
I20150924-17:41:32.252(-3)? [velocity] 1 mirror(s) requested
I20150924-17:41:32.316(-3)? [velocity] Mirror process forked with pid 24873
I20150924-17:41:32.316(-3)? [velocity] cucumber is starting a mirror at http://localhost:54111/.
I20150924-17:41:32.339(-3)? [velocity] You can see the mirror logs at: tail -f /Users/thiagoassis/Documents/workspace/gettydata/gdd/.meteor/local/log/cucumber.log
=> Started your app.

=> App running at: http://localhost:3000/
I20150924-17:41:32.431(-3)? [velocity] Search framework for path tests/cucumber/package.json
I20150924-17:41:32.432(-3)? [velocity] No framework registered for tests/cucumber/package.json
I20150924-17:41:32.494(-3)? [velocity] Search framework for path tests/cucumber/features/apis.feature
I20150924-17:41:32.495(-3)? [velocity] Target framework for tests/cucumber/features/apis.feature is cucumber
I20150924-17:41:32.498(-3)? [velocity] Search framework for path tests/cucumber/features/countries.feature
I20150924-17:41:32.499(-3)? [velocity] Target framework for tests/cucumber/features/countries.feature is cucumber
I20150924-17:41:32.501(-3)? [velocity] Search framework for path tests/cucumber/features/fields.feature
I20150924-17:41:32.501(-3)? [velocity] Target framework for tests/cucumber/features/fields.feature is cucumber
I20150924-17:41:32.502(-3)? [velocity] Search framework for path tests/cucumber/features/login.feature
I20150924-17:41:32.503(-3)? [velocity] Target framework for tests/cucumber/features/login.feature is cucumber
I20150924-17:41:32.504(-3)? [velocity] Search framework for path tests/cucumber/features/sites.feature
I20150924-17:41:32.504(-3)? [velocity] Target framework for tests/cucumber/features/sites.feature is cucumber
I20150924-17:41:32.542(-3)? [velocity] Search framework for path tests/cucumber/features/users.feature
I20150924-17:41:32.543(-3)? [velocity] Target framework for tests/cucumber/features/users.feature is cucumber
I20150924-17:41:32.543(-3)? [velocity] Search framework for path tests/cucumber/fixtures/base_fixtures.js
I20150924-17:41:32.543(-3)? [velocity] Target framework for tests/cucumber/fixtures/base_fixtures.js is cucumber
I20150924-17:41:32.544(-3)? [velocity] Search framework for path tests/cucumber/features/step_definitions/api_steps.js
I20150924-17:41:32.544(-3)? [velocity] Target framework for tests/cucumber/features/step_definitions/api_steps.js is cucumber
I20150924-17:41:32.546(-3)? [velocity] Search framework for path tests/cucumber/features/step_definitions/country_steps.js
I20150924-17:41:32.546(-3)? [velocity] Target framework for tests/cucumber/features/step_definitions/country_steps.js is cucumber
I20150924-17:41:32.548(-3)? [velocity] Search framework for path tests/cucumber/features/step_definitions/field_steps.js
I20150924-17:41:32.548(-3)? [velocity] Target framework for tests/cucumber/features/step_definitions/field_steps.js is cucumber
I20150924-17:41:32.549(-3)? [velocity] Search framework for path tests/cucumber/features/step_definitions/global_steps.js
I20150924-17:41:32.549(-3)? [velocity] Target framework for tests/cucumber/features/step_definitions/global_steps.js is cucumber
I20150924-17:41:32.550(-3)? [velocity] Search framework for path tests/cucumber/features/step_definitions/login_steps.js
I20150924-17:41:32.550(-3)? [velocity] Target framework for tests/cucumber/features/step_definitions/login_steps.js is cucumber
I20150924-17:41:32.552(-3)? [velocity] Search framework for path tests/cucumber/features/step_definitions/users_steps.js
I20150924-17:41:32.552(-3)? [velocity] Target framework for tests/cucumber/features/step_definitions/users_steps.js is cucumber
I20150924-17:41:32.559(-3)? [velocity] File scan complete, now watching /tests
I20150924-17:41:32.559(-3)? [velocity] Triggering queued startup functions
I20150924-17:43:38.709(-3)? [velocity] Mirror registered. Handshaking with mirror...
I20150924-17:43:38.865(-3)? [velocity] Connected to mirror, setting state to ready { framework: 'cucumber',
I20150924-17:43:38.866(-3)?   host: 'http://localhost:54111/',
I20150924-17:43:38.866(-3)?   port: '54111' }

Warning when installing on Windows re. bluebird

Just installed chimp and got this warning:

npm WARN peerDependencies The peer dependency bluebird@~2.2.1 included from pogo will no   
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency  
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.

waitForXXX does not throw an error / correct message in sync mode

When waiting for a condition, such as waitForExist('selector'), WebdriverIO will do exactly what it's told to do. The synchronous flow will continue regardless of the value returned from waitForExist. The user intention will likely want the step to fail if the waitFor command fails.

The current workaround is to do this:

expect(browser.waitForExist(selector)).to.equal(true, selector + ' does not exist.');

We need a solution that respects the users original intention without the extra work.

Options:

  1. Make a list of methods that we know have this issue and patch them to fail in sync steps (all the waitForXXX and isXXX)
  2. Provide a helper for users to use
  3. others?

I'm leaning towards option 1 right now. @sanjo what you think?

`--browser chrome` does not work

Out of the box nothing happens.
After downloading and starting chromedriver it still fails with:

RuntimeError: RuntimeError
     (UnknownError:13) An unknown server-side error occurred while processing the command.
     Problem: POST /session//timeouts/async_script
Build info: version: '2.44.0', revision: '76d78cf', time: '2014-10-23 20:02:37'
System info: host: 'jonas-mbp', ip: '192.168.2.100', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.10.2', java.version: '1.8.0_25'
Driver info: driver.version: unknown

Output logs for each tool

Feature request

When I start cuke-monkey with "--log=/logs/cuke-monkey/"
Then it writes a separate log file for each tool into the folder "
/logs/cuke-monkey/"

Use cases:

  • In case that something has gone wrong, you can inspect the logs.
  • Watch the output of the tool separately via tail -f

`--browser firefox` does not work

It opens Firefox but then does nothing and times out. It opens Firefox again for the next scenario and the same thing as before happens.

Should disable cache in watch mode

When in watch mode it would be useful to have the browser cache disabled. That way changes to source code would be reflected immediately rather than having to shift reload.

In normal test mode, browser cache is still useful to speed up tests

Selenium processes hanging around in OSX 10.9.5

If Chimp exits a few times with

[chimp] Finished running async processes with errors

ps ax | grep java yields this sort of thing:

2128 s000 S 0:02.27 /Users/myuser/tools/java -jar /Users/myuser/.npm-packages/lib/node_modules/chimp/node_modules/selenium-standalone/.selenium/selenium-server/2.46.0-server.jar -Dwebdriver.chrome.driver=/Users/myuser/.npm-packages/lib/node_modules/chimp/node_modules/selenium-standalone/.selenium/chromedriver/2.16-x64-chromedriver -port 49850
3116 s000 S 0:01.99 /Users/myuser/tools/java -jar /Users/myuser/.npm-packages/lib/node_modules/chimp/node_modules/selenium-standalone/.selenium/selenium-server/2.46.0-server.jar -Dwebdriver.chrome.driver=/Users/myuser/.npm-packages/lib/node_modules/chimp/node_modules/selenium-standalone/.selenium/chromedriver/2.16-x64-chromedriver -port 50325
4381 s000 S 0:04.11 /Users/myuser/tools/java -jar /Users/myuser/.npm-packages/lib/node_modules/chimp/node_modules/selenium-standalone/.selenium/selenium-server/2.46.0-server.jar -Dwebdriver.chrome.driver=/Users/myuser/.npm-packages/lib/node_modules/chimp/node_modules/selenium-standalone/.selenium/chromedriver/2.16-x64-chromedriver -port 50969
4744 s000 S 0:02.82 /Users/myuser/tools/java -jar /Users/myuser/.npm-packages/lib/node_modules/chimp/node_modules/selenium-standalone/.selenium/selenium-server/2.46.0-server.jar -Dwebdriver.chrome.driver=/Users/myuser/.npm-packages/lib/node_modules/chimp/node_modules/selenium-standalone/.selenium/chromedriver/2.16-x64-chromedriver -port 51160

The processes don't seem to hang around if Chimp is stopped before it hits the error

[xolvio:cucumber] Bad response from Chimp server.

[velocity] Established connection with Velocity.
[xolvio:cucumber] Cucumber is running
[chimp] Finished running async processes with errors
[chimp] run complete with errors [Error: Another Selenium process is already running]
[chimp] Could not get Cucumber Results from run result:
[ undefined, [ undefined ] ]
[xolvio:cucumber] Bad response from Chimp server.

ss

alan            80627   0.0  0.7  3147416 121272   ??  S     4:01PM   0:01.55 /Users/alan/.meteor/packages/velocity_meteor-tool/.1.1.4_2.12re4pp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/bin/node /Users/alan/.meteor/packages/xolvio_cucumber/.0.13.8.17ci1po++os.osx.x86_64+web.browser+web.cordova/npm/node_modules/chimp/bin/chimp -r /Users/alan/Dev/AHM/GFF/prototype1/admin/tests/cucumber/features --snippets --ddp=http://localhost:64569/ --log=error --screenshotsPath=/Users/alan/Dev/AHM/GFF/prototype1/admin/tests/cucumber/.screenshots --tags=@dev --server --serverPort=8866
alan            80626   0.0  0.1  3065476  14656   ??  Ss    4:01PM   0:00.05 /Users/alan/.meteor/packages/velocity_meteor-tool/.1.1.4_2.12re4pp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/bin/node /private/var/folders/_q/8jh0f25s4xd5wj0h6p0zd0hr0000gn/T/meteor-test-run1frn2f4/.meteor/local/build/programs/server/assets/packages/sanjo_long-running-child-process/lib/spawnScript.js 80577 Chimp_8866 /Users/alan/.meteor/packages/velocity_meteor-tool/.1.1.4_2.12re4pp++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/bin/node /Users/alan/.meteor/packages/xolvio_cucumber/.0.13.8.17ci1po++os.osx.x86_64+web.browser+web.cordova/npm/node_modules/chimp/bin/chimp -r /Users/alan/Dev/AHM/GFF/prototype1/admin/tests/cucumber/features --snippets --ddp=http://localhost:64569/ --log=error --screenshotsPath=/Users/alan/Dev/AHM/GFF/prototype1/admin/tests/cucumber/.screenshots --tags=@dev --server --serverPort=8866

This is a pretty simple meteor application, fresh install of xolvio:cucumber and using the sample specifications files.

When using sauce labs as a provider, Session manager attempts to kill selenium sessions

Session manager should check the noSessionReuse environment variable, and if it's true (as set by bin/chimp when using something like --host=ondemand.saucelabs.com) then the session manager shouldn't attempt to kill the session.

Additionally, when session manager attempts to kill a session it doesn't check if _getWebdriverSessions returned an error message or not.

Selenium Server is not shut down

Version: 0.12 but also before.

Reproduce:

In the chimp directory:

ps ax | grep selenium
# Delete the bdd-cli.feature because it is buggy
node bin/chimp --jsonOutput=result.json
ps ax | grep selenium

Shows me that selenium is still running:

6822 pts/15   Sl     0:01 /usr/bin/java -jar /home/jonas/projects/chimp/node_modules/selenium-standalone/.selenium/selenium-server/2.46.0-server.jar -Dwebdriver.chrome.driver=/home/jonas/projects/chimp/node_modules/selenium-standalone/.selenium/chromedriver/2.16-x64-chromedriver -port 53512

Rare failures on the tutorial example

Posted at https://chimp.readme.io/v1.0/discuss/55c75be337d9670d00ca4485 but not sure if it's a tutorial oversight, or if there's some weird bug with Chimp.

I've had very odd results with this test after changing the waitForExist line to

browser.waitForExist('a=doesntreallyexist');

If I rename the step_defs.js file and/or move it under some subdirectory and/or change doesntreallyexist to some other nonexistent string` a bunch of times (couldn't find a clearly reproducible sequence), the test will correctly fail. Most of the time the test will incorrectly pass.

Here's a log excerpt:

[chimp] Running...

Feature: Search the Web

  As a human
  I want to search the web
  So I can find information

  @watch
  Scenario: Search for Xolv.io   # features\search.feature:8
    Given I have visited Google  # features\search.feature:9
    When I search for "Xolv.io"  # features\search.feature:10
    Then I see "Xolv.io"         # features\search.feature:11


1 scenario (1 passed)
3 steps (3 passed)
[chimp] Running...
[chimp] Running...

Feature: Search the Web

  As a human
  I want to search the web
  So I can find information

  @watch
  Scenario: Search for Xolv.io   # features\search.feature:8
    Given I have visited Google  # features\search.feature:9
    When I search for "Xolv.io"  # features\search.feature:10
    Then I see "Xolv.io"         # features\search.feature:11


1 scenario (1 passed)
3 steps (3 passed)
[chimp] Running...

Feature: Search the Web

  As a human
  I want to search the web
  So I can find information

  @watch
  Scenario: Search for Xolv.io   # features\search.feature:8
    Given I have visited Google  # features\search.feature:9
    When I search for "Xolv.io"  # features\search.feature:10
    Then I see "Xolv.io"         # features\search.feature:11
      Error: element (a=pp) still not existing after 10000ms
        at World.<anonymous> (features\search.steps.js:13:13)

          - - - - -




(::) failed steps (::)

Error: element (a=pp) still not existing after 10000ms
  at World.<anonymous> (features\search.steps.js:13:13)

    - - - - -


Failing scenarios:
features\search.feature:8 # Scenario: Search for Xolv.io

1 scenario (1 failed)
3 steps (1 failed, 2 passed)

[chimp] Finished running async processes with errors
[chimp] run complete with errors Cucumber steps failed
[chimp] Running...

Feature: Search the Web

  As a human
  I want to search the web
  So I can find information

  @watch
  Scenario: Search for Xolv.io   # features\search.feature:8
    Given I have visited Google  # features\search.feature:9
    When I search for "Xolv.io"  # features\search.feature:10
    Then I see "Xolv.io"         # features\search.feature:11
      Error: element (a=ppihiu) still not existing after 10000ms
        at World.<anonymous> (features\search.steps.js:13:13)

          - - - - -




(::) failed steps (::)

Error: element (a=ppihiu) still not existing after 10000ms
  at World.<anonymous> (features\search.steps.js:13:13)

    - - - - -


Failing scenarios:
features\search.feature:8 # Scenario: Search for Xolv.io

1 scenario (1 failed)
3 steps (1 failed, 2 passed)

[chimp] Finished running async processes with errors
[chimp] run complete with errors Cucumber steps failed
[chimp] Running...
[chimp] Running...

Feature: Search the Web

  As a human
  I want to search the web
  So I can find information

  @watch
  Scenario: Search for Xolv.io   # features\search.feature:8
    Given I have visited Google  # features\search.feature:9
    When I search for "Xolv.io"  # features\search.feature:10
    Then I see "Xolv.io"         # features\search.feature:11


1 scenario (1 passed)
3 steps (3 passed)

I'm running chimp --watch on Windows 7 with Chrome. Hopefully I'm missing something obvious.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.