Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Behat tests failing on Pipelines in master/pulled 8.6.12 release #1111

Closed
geerlingguy opened this issue Feb 16, 2017 · 3 comments
Closed

Behat tests failing on Pipelines in master/pulled 8.6.12 release #1111

geerlingguy opened this issue Feb 16, 2017 · 3 comments
Labels
Bug Something isn't working

Comments

@geerlingguy
Copy link
Contributor

My system information:

  • Operating system type: macOS
  • Operating system version: 10.12.3
  • BLT version: 8.6.12

Output of blt doctor:

$ blt doctor
blt > doctor:
Changed current directory to /Users/jeff.geerling/.composer
Composer could not find a composer.json file in /Users/jeff.geerling/.composer
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
+----------------------+----------------------------------------------------------------------------------+
| Property             | Value                                                                            |
+----------------------+----------------------------------------------------------------------------------+
| %paths               |                                                                                  |
|  - %root             | /Users/jeff.geerling/Sites/acquia/eejgeerling/docroot                            |
|  - %site             | sites/default                                                                    |
|  - %modules          | modules                                                                          |
|  - %themes           | themes                                                                           |
|  - %config-sync      | /Users/jeff.geerling/Sites/acquia/eejgeerling/config/default                     |
| blt-version          | 8.6.12                                                                           |
| config-sync          | /Users/jeff.geerling/Sites/acquia/eejgeerling/config/default                     |
| db-driver            | mysql                                                                            |
| db-hostname          | localhost                                                                        |
| db-name              | drupal                                                                           |
| db-password          | drupal                                                                           |
| db-port              | 3306                                                                             |
| db-username          | drupal                                                                           |
| drupal-settings-file | sites/default/settings.php                                                       |
| drupal-version       | 8.2.6                                                                            |
| drush-alias-files    | /Users/jeff.geerling/.drush/drupalvm.aliases.drushrc.php                         |
|                      | /Users/jeff.geerling/.drush/macbook_pro_battery_test.aliases.drushrc.php         |
|                      | /Users/jeff.geerling/.drush/manativm.aliases.drushrc.php                         |
|                      | /Users/jeff.geerling/Sites/acquia/eejgeerling/docroot/../drush/site-aliases/alia |
|                      | ses.drushrc.php                                                                  |
|                      | /Users/jeff.geerling/Sites/acquia/eejgeerling/docroot/../drush/site-aliases/exam |
|                      | ple.acsf.aliases.drushrc.php                                                     |
|                      | /Users/jeff.geerling/Sites/acquia/eejgeerling/docroot/../drush/site-aliases/exam |
|                      | ple.local.aliases.drushrc.php                                                    |
| drush-conf           | /Users/jeff.geerling/Sites/acquia/eejgeerling/drush/drushrc.php                  |
| drush-script         | /Users/jeff.geerling/Sites/acquia/eejgeerling/vendor/drush/drush/drush.php       |
| drush-temp           | /tmp                                                                             |
| drush-version        | 8.1.9                                                                            |
| local-drushrc        | /Users/jeff.geerling/Sites/acquia/eejgeerling/docroot/sites/default/local.drushr |
|                      | c.php                                                                            |
| local-settings       | /Users/jeff.geerling/Sites/acquia/eejgeerling/docroot/sites/default/settings/loc |
|                      | al.settings.php                                                                  |
| modules              | modules                                                                          |
| php-bin              | /usr/local/bin/php                                                               |
| php-conf             | /usr/local/etc/php/7.0/php.ini                                                   |
| php-os               | Darwin                                                                           |
| root                 | /Users/jeff.geerling/Sites/acquia/eejgeerling/docroot                            |
| site                 | sites/default                                                                    |
| themes               | themes                                                                           |
| uri                  | http://local.eejgeerling.com                                                     |
+----------------------+----------------------------------------------------------------------------------+
+--------------------------+----------------------------------------------------------------------------------+
| Check                    | Outcome                                                                          |
+--------------------------+----------------------------------------------------------------------------------+
| checkDocrootExists       | Found docroot.                                                                   |
| checkCoreExists          | Drupal core exists                                                               |
| checkSettingsFile        | BLT settings are included in settings file.                                      |
| checkLocalSettingsFile   | Found your local settings file.                                                  |
| checkLocalDrushFile      | Found your local drush settings file.                                            |
| checkUri                 | $options['uri'] is set.                                                          |
| checkUriResponse         | Did not get a response from http://local.eejgeerling.com                         |
|                          |                                                                                  |
|                          | Is your *AMP stack running?                                                      |
|                          | Is your web server configured to serve this URI from                             |
|                          | /Users/jeff.geerling/Sites/acquia/eejgeerling/docroot?                           |
|                          | Is $options['uri'] set correctly in                                              |
|                          | /Users/jeff.geerling/Sites/acquia/eejgeerling/docroot/sites/default/local.drushr |
|                          | c.php?                                                                           |
|                          |                                                                                  |
|                          | To generate settings files and install Drupal, run `blt local:setup`             |
|                          |                                                                                  |
| checkFileSystem:%files   | Public files directory is not set.                                               |
| checkFileSystem:%private | Private files directory is not set.                                              |
| checkFileSystem:%temp    | Temporary files directory is not set.                                            |
| checkDbConnection        | Could not connect to MySQL database.                                             |
|                          |                                                                                  |
|                          | Is your *AMP stack running?                                                      |
|                          | Are your database credentials correct?                                           |
|                          |   db-driver: mysql                                                               |
|                          |   db-hostname: localhost                                                         |
|                          |   db-username: drupal                                                            |
|                          |   db-password: drupal                                                            |
|                          |   db-name: drupal                                                                |
|                          |   db-port: 3306                                                                  |
|                          |                                                                                  |
|                          | To verify your mysql credentials, run `mysql -u drupal -h localhost -pdrupal -P  |
|                          | 3306`                                                                            |
|                          |                                                                                  |
|                          | Are you using the correct PHP binary?                                            |
|                          | Is PHP using the correct MySQL socket?                                           |
|                          |   php-os: Darwin                                                                 |
|                          |   php-bin: /usr/local/bin/php                                                    |
|                          |   php-conf: Array                                                                |
|                          |   php-mysql:                                                                     |
|                          |                                                                                  |
|                          | Are you using the correct site and settings.php file?                            |
|                          |   site: sites/default                                                            |
|                          |   drupal-settings-file: sites/default/settings.php                               |
|                          |                                                                                  |
|                          | To verify, run `drush sqlc`                                                      |
|                          |                                                                                  |
| checkDrupalBootstrapped  | Could not bootstrap Drupal via drush without alias.                              |
| checkCaching:page        | Drupal cache is disabled.                                                        |
| checkCaching:css         | CSS preprocessing is disabled.                                                   |
| checkCaching:js          | JS preprocessing is disabled.                                                    |
| checkNvmExists           | NVM exists.                                                                      |
| checkCiConfig            | Git remotes are set in project.yml.                                              |
| checkComposer:require    | acquia/blt is in composer.json's require object.                                 |
| checkComposer:plugins    | hirak/prestissimo plugin for composer is not installed.                          |
|                          |   Run `composer global require hirak/prestissimo:^0.3` to install it.            |
|                          |   This will improve composer install/update performance by parallelizing the     |
|                          | download of dependency information.                                              |
| checkBehat:exists        | Behat local settings file exists.                                                |
| checkProjectYml:keys     | project.yml has no deprecated keys.                                              |
| checkAcsfConfig          | BLT settings are included in your pre-settings-php include.                      |
| checkPhpDateTimezone     | PHP setting for date.timezone is correctly set                                   |
+--------------------------+----------------------------------------------------------------------------------+

BUILD FINISHED; 1.9251 second

When I run this command:

  • Submit a PR or otherwise kick off an Acquia Pipelines build.

I get the following output:

	blt > setup:behat:
	     [copy] example.local.yml omitted, is up to date
	blt > test:behat:check:
	 [property] Loading /mnt/tmp/local.prod/source/tests/behat/local.yml
	     [echo] 
	     [echo] One or more values in tests/behat/local.yml reference file paths that do not exist on this system.
	     [echo] This is typically related to using a virtual machine.
	     [echo] 
	     [echo] Try one of the following solution:
	     [echo] 1) Execute the tests on the correct system.
	     [echo] 2) Correct the value(s).
	     [echo] 3) Remove tests/behat/local.yml so that it can be regenerated automatically from example.local.yml.
	     [echo] 
	     [echo] Values are:
	     [echo] drupal_root: /Users/jeff.geerling/Sites/acquia/eejgeerling/docroot"
	     [echo] features:    /Users/jeff.geerling/Sites/acquia/eejgeerling"
	     [echo] bootstrap:   /Users/jeff.geerling/Sites/acquia/eejgeerling/tests/behat/features/bootstrap
	     [echo] 
	
	Do you want to re-generate Behat configuration? [y/n] [y] ?     [delete] Deleting: /mnt/tmp/local.prod/source/tests/behat/local.yml
	 [property] Loading /mnt/tmp/local.prod/source/blt/project.yml
	 [property] Loading /mnt/tmp/local.prod/source/blt/project.local.yml
	blt > setup:behat:
	     [copy] Copying 1 file to /mnt/tmp/local.prod/source/tests/behat
	     [copy] From /mnt/tmp/local.prod/source/tests/behat/example.local.yml to /mnt/tmp/local.prod/source/tests/behat/local.yml
	     [echo] Executing Behat tests with configuratoin:
	     [echo] drupal_root: /Users/jeff.geerling/Sites/acquia/eejgeerling/docroot"
	     [echo] base_url: http://local.eejgeerling.com"
	blt > tests:run-server:
	     [echo] Using 'drush runserver' for tests.
	     [echo] Running server at http://127.0.0.1:8888
	     [echo] Waiting 10 seconds for http://127.0.0.1:8888 to become available.
	Possible malformed URL: http://127.0.0.1:8888
	blt > tests:behat:
	 [property] Loading /mnt/tmp/local.prod/source/blt/project.yml
	 [property] Loading /mnt/tmp/local.prod/source/blt/project.local.yml
	blt > tests:selenium:kill:
	     [echo] Killing any selenium processes that are already running.
	sh: 1: lsof: not found
	 [property] Loading /mnt/tmp/local.prod/source/blt/project.yml
	 [property] Loading /mnt/tmp/local.prod/source/blt/project.local.yml
	blt > tests:phantomjs:kill:
	     [echo] Killing any PhantomJS processes that are already running.
	sh: 1: lsof: not found
	 [property] Loading /mnt/tmp/local.prod/source/blt/project.yml
	 [property] Loading /mnt/tmp/local.prod/source/blt/project.local.yml
	blt > tests:phantomjs:configure:
	> rm -rf vendor/bin/phantomjs
	> PhantomInstaller\Installer::installPhantomJS
	  - Installing phantomjs (2.1.1) Downloading: 100%
	blt > tests:phantomjs:launch:
	     [echo] Launching PhantomJS GhostDriver.
	 [property] Loading /mnt/tmp/local.prod/source/blt/project.yml
	 [property] Loading /mnt/tmp/local.prod/source/blt/project.local.yml
	blt > tests:phantomjs:kill:
	     [echo] Killing any PhantomJS processes that are already running.
	sh: 1: lsof: not found
	     [echo] Waiting 10 seconds for PhantomJS (http://127.0.0.1:4444) to become available.
	Possible malformed URL: http://127.0.0.1:4444/wd/hub
	 [property] Loading /mnt/tmp/local.prod/source/blt/project.yml
	 [property] Loading /mnt/tmp/local.prod/source/blt/project.local.yml
	blt > tests:behat:execute:
	     [exec] /mnt/tmp/local.prod/source/tests/behat/features/Examples.feature
	    [behat] Running '/mnt/tmp/local.prod/source/vendor/bin/behat /mnt/tmp/local.prod/source/tests/behat --config=/mnt/tmp/local.prod/source/tests/behat/local.yml --tags="~experimental&&~lightningextension" --format=pretty --format=junit  --out=std --out=/mnt/tmp/local.prod/source/reports  --profile=local --strict --verbose --colors --stop-on-failure'
	@example
	Feature: Web drivers
	  In order to verify that web drivers are working
	  As a user
	  I should be able to load the homepage
	  With and without Javascript
	
	  @javascript
	  Scenario: Load a page with Javascript # features/Examples.feature:9
	    Given I am on "/"                   # Drupal\DrupalExtension\Context\MinkContext::visit()
	    Then I should see the text "Log in" # Drupal\DrupalExtension\Context\MinkContext::assertTextVisible()
	      The text "Log in" was not found anywhere in the text of the current page.
	      
	      +--[ about:blank | Selenium2Driver ]
	      |
	      |  
	      |
	
	--- Failed scenarios:
	
	    features/Examples.feature:9
	
	1 scenario (1 failed)
	2 steps (1 passed, 1 failed)
	0m0.38s (27.49Mb)
	  [foreach] /mnt/tmp/local.prod/source/./vendor/acquia/blt/phing/tasks/tests.xml:89:8: /mnt/tmp/local.prod/source/./vendor/acquia/blt/phing/tasks/tests.xml:105:1: Behat exited with code 1
	
	BUILD FAILED/mnt/tmp/local.prod/source/./vendor/acquia/blt/phing/tasks/tests.xml:30:31: Execution of the target buildfile failed. Aborting.
	; 4 minutes  59.59 seconds
	Killing background jobs
================================================================================

And I expected this to happen:

  • The tests should run and pass.
@geerlingguy
Copy link
Contributor Author

One thing I noticed:

sh: 1: lsof: not found

I'm guessing lsof is not present inside the Pipelines container.

@grasmash grasmash added the Bug Something isn't working label Feb 16, 2017
@grasmash
Copy link
Contributor

@geerlingguy I've resolved this. PhantomJS tests are passing when using BLT 8.x on Pipelines.

The lsof thing... separate issue. Non-fatal warning. Probably just need to pipe those errors to /dev/null.

@geerlingguy
Copy link
Contributor Author

@grasmash - Is that going to be something in 8.6.13 then?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants