GithubHelp home page GithubHelp logo

browserstack / browserstack-local-php Goto Github PK

View Code? Open in Web Editor NEW
12.0 12.0 10.0 68 KB

PHP bindings for BrowserStack Local

Home Page: https://www.browserstack.com

License: MIT License

PHP 100.00%

browserstack-local-php's People

Contributors

adityahirapara avatar akhillb avatar bipul21 avatar bstack-security-github avatar francisf avatar nidhimj22 avatar raghuhit avatar thebeardedcoderin avatar tr4n2uil avatar vedharish avatar

Stargazers

 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

browserstack-local-php's Issues

stop() Doesn't seem to be working inside a Docker container

Hey there

I'm experiencing some issues with getting the client to stop after my tests have been run.
If I spin up a clean Docker image of my application, and execute ps -ax inside of it I get the following as result:

PID TTY      STAT   TIME COMMAND
    1 ?        Ss     0:00 apache2 -DFOREGROUND
   17 ?        S      0:00 apache2 -DFOREGROUND
   18 ?        S      0:00 apache2 -DFOREGROUND
   19 ?        S      0:00 apache2 -DFOREGROUND
   20 ?        S      0:00 apache2 -DFOREGROUND
   21 ?        S      0:00 apache2 -DFOREGROUND
   22 ?        Rs     0:00 ps -ax

After I run my tests using the BrowserStackWebDriver helper that has been provided by the documentation here, the client is still running. The ps -ax output after the tests have been run:

PID TTY      STAT   TIME COMMAND
    1 ?        Ss     0:00 apache2 -DFOREGROUND
   16 ?        S      0:00 apache2 -DFOREGROUND
   17 ?        S      0:00 apache2 -DFOREGROUND
   18 ?        S      0:00 apache2 -DFOREGROUND
   19 ?        S      0:00 apache2 -DFOREGROUND
   20 ?        S      0:00 apache2 -DFOREGROUND
   55 ?        Ssl    0:00 BrowserStackLocal -logFile /var/www/html/local.log <key> -daemonInstance
   76 ?        S      0:00 apache2 -DFOREGROUND
   78 ?        S      0:00 apache2 -DFOREGROUND
   79 ?        S      0:00 apache2 -DFOREGROUND
   80 ?        S      0:00 apache2 -DFOREGROUND
   81 ?        S      0:00 apache2 -DFOREGROUND
  105 ?        Rs     0:00 ps -ax

My conclusion is that the stop() method is not quite working as expected, I have double checked and even removed the surrounding if case (if($this->bs_local->isRunning())) to double check this.

If I try to re-run the tests without completely restarting my app container I get the following error message, hence I'm investigating this:

Do not run Composer as root/super user! See https://getcomposer.org/root for details
> php vendor/bin/codecept run 'behavioral'
Codeception PHP Testing Framework v2.5.5
Powered by PHPUnit 7.5.9 by Sebastian Bergmann and contributors.
Running with seed: 


In Local.php line 125:
                                                                               
  Either another browserstack local client is running on your machine or some  
   server is listening on port 45691                                           
                                                                               

run [-o|--override OVERRIDE] [-e|--ext EXT] [--report] [--html [HTML]] [--xml [XML]] [--phpunit-xml [PHPUNIT-XML]] [--tap [TAP]] [--json [JSON]] [--colors] [--no-colors] [--silent] [--steps] [-d|--debug] [--coverage [COVERAGE]] [--coverage-html [COVERAGE-HTML]] [--coverage-xml [COVERAGE-XML]] [--coverage-text [COVERAGE-TEXT]] [--coverage-crap4j [COVERAGE-CRAP4J]] [--coverage-phpunit [COVERAGE-PHPUNIT]] [--no-exit] [-g|--group GROUP] [-s|--skip SKIP] [-x|--skip-group SKIP-GROUP] [--env ENV] [-f|--fail-fast] [--no-rebuild] [--seed SEED] [--] [<suite> [<test>]]

Script php vendor/bin/codecept run handling the test event returned with error code 1

Any ideas?

Edit: I would like to prevent a "shotgun" solution for this issue as discussed here.

BrowserStack\LocalException : Key is required to start local testing

I run phpunit test.php for my test and get the result:
PHP Fatal error: Uncaught BrowserStack\LocalException: [0]: Key is required to start local testing!
thrown in vendor/browserstack/browserstack-local/lib/Local.php on line 125

Who know the root cause. Please let me know.
Thanks!

Docs are wrong.

It should say php composer.phar require browserstack/browserstack-local instead of php composer.phar require browserstack/local:dev-master

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.