投稿者 |
スレッド |
seasoft |
投稿日時: 2024/2/26 15:46
対応状況: −−−
|
神 登録日: 2008/6/4 居住地: 投稿: 7369 |
Re: E2E テスト実行環境 failed の一部は、受注情報に依存している様子です。 おそらく以下が空回りしているようです。 docker-compose exec -T ec-cube php data/vendor/bin/eccube eccube:fixtures:generate --products=5 --customers=1 --orders=5
実行すると、実行結果やエラーは表示されません。 デバッグすると data/vendor/nanasess/eccube2-fixture-generator/src/Command/GenerateDummyDataCommand.php は読み込まれているものの、メソッドは一切実行されていない様子です。 確認すべき点などありましたら、教えてください。 ---------------- Seasoft こちらでの投稿は、アイディア程度に留めさせていただいております。 個別案件の作業は有償で承っております。お気軽にご相談ください。
|
|
|
nanasess |
投稿日時: 2024/2/26 16:07
対応状況: −−−
|
神 登録日: 2006/9/9 居住地: 投稿: 2325 |
Re: E2E テスト実行環境 -ddisplay_errors=1 を入れたらエラーメッセージ表示されませんかね??
|
|
|
seasoft |
投稿日時: 2024/2/27 12:15
対応状況: −−−
|
神 登録日: 2008/6/4 居住地: 投稿: 7369 |
Re: E2E テスト実行環境 PHP エラー出てました。 $ docker-compose exec ec-cube php -ddisplay_errors=1 data/vendor/bin/eccube
Fatal error: Uncaught Symfony\Component\DependencyInjection\Exception\RuntimeException: Cannot autowire service "Eccube2\Command\Install\InsertDataCommand": argument "$eventDispatcher" of method "__construct()" references interface "Symfony\Component\EventDispatcher\EventDispatcherInterface" but no such service exists. You should maybe alias this interface to the existing "event_dispatcher" service. in /var/www/app/data/vendor/symfony/dependency-injection/Compiler/DefinitionErrorExceptionPass.php:54
Stack trace:
#0 /var/www/app/data/vendor/symfony/dependency-injection/Compiler/AbstractRecursivePass.php(83): Symfony\Component\DependencyInjection\Compiler\DefinitionErrorExceptionPass->processValue(Object(Symfony\Component\DependencyInjection\Definition), true)
#1 /var/www/app/data/vendor/symfony/dependency-injection/Compiler/DefinitionErrorExceptionPass.php(32): Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass->processValue(Array, true)
#2 /var/www/app/data/vendor/symfony/dependency-injection/Compiler/Ab in /var/www/app/data/vendor/symfony/dependency-injection/Compiler/DefinitionErrorExceptionPass.php on line 54
Composer の依存関係でしょうか。 以下のように構成しています。 git restore composer.*
docker-compose exec ec-cube sh -c 'rm -r data/vendor/*'
docker-compose exec ec-cube composer config --unset platform.php
docker-compose exec ec-cube composer install
docker-compose exec ec-cube composer require symfony/yaml:^4.0
docker-compose exec ec-cube composer require ec-cube2/cli
$ docker-compose exec ec-cube php -v
PHP 7.4.33 (cli) (built: Nov 15 2022 06:03:30) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.33, Copyright (c), by Zend Technologies
with Xdebug v3.1.5, Copyright (c) 2002-2022, by Derick Rethans
---------------- Seasoft こちらでの投稿は、アイディア程度に留めさせていただいております。 個別案件の作業は有償で承っております。お気軽にご相談ください。
|
|
|
seasoft |
投稿日時: 2024/3/2 12:22
対応状況: −−−
|
神 登録日: 2008/6/4 居住地: 投稿: 7369 |
Re: E2E テスト実行環境 PHP 8.1 も同様でした。 ただ、Exception が切れなくなりました。 $ docker-compose exec ec-cube php -ddisplay_errors=1 data/vendor/bin/eccube
Fatal error: Uncaught Symfony\Component\DependencyInjection\Exception\RuntimeException: Cannot autowire service "Eccube2\Command\Install\InsertDataCommand": argument "$eventDispatcher" of method "__construct()" references interface "Symfony\Component\EventDispatcher\EventDispatcherInterface" but no such service exists. You should maybe alias this interface to the existing "event_dispatcher" service. in /var/www/app/data/vendor/symfony/dependency-injection/Compiler/DefinitionErrorExceptionPass.php:54
Stack trace:
#0 /var/www/app/data/vendor/symfony/dependency-injection/Compiler/AbstractRecursivePass.php(83): Symfony\Component\DependencyInjection\Compiler\DefinitionErrorExceptionPass->processValue(Object(Symfony\Component\DependencyInjection\Definition), true)
#1 /var/www/app/data/vendor/symfony/dependency-injection/Compiler/DefinitionErrorExceptionPass.php(32): Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass->processValue(Array, true)
#2 /var/www/app/data/vendor/symfony/dependency-injection/Compiler/AbstractRecursivePass.php(47): Symfony\Component\DependencyInjection\Compiler\DefinitionErrorExceptionPass->processValue(Array, true)
#3 /var/www/app/data/vendor/symfony/dependency-injection/Compiler/Compiler.php(94): Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass->process(Object(Symfony\Component\DependencyInjection\ContainerBuilder))
#4 /var/www/app/data/vendor/symfony/dependency-injection/ContainerBuilder.php(762): Symfony\Component\DependencyInjection\Compiler\Compiler->compile(Object(Symfony\Component\DependencyInjection\ContainerBuilder))
#5 /var/www/app/data/vendor/ec-cube2/cli/src/Eccube2/Console/Application.php(33): Symfony\Component\DependencyInjection\ContainerBuilder->compile()
#6 /var/www/app/data/vendor/ec-cube2/cli/bin/eccube(9): Eccube2\Console\Application->__construct()
#7 /var/www/app/data/vendor/bin/eccube(119): include('/var/www/app/da...')
#8 {main}
thrown in /var/www/app/data/vendor/symfony/dependency-injection/Compiler/DefinitionErrorExceptionPass.php on line 54
git restore composer.*
docker-compose exec ec-cube sh -c 'rm -r data/vendor/*'
docker-compose exec ec-cube composer config --unset platform.php
docker-compose exec ec-cube composer install
docker-compose exec ec-cube composer require symfony/yaml:^4.0 --ignore-platform-req=php
docker-compose exec ec-cube composer require ec-cube2/cli --ignore-platform-req=php
PHP 7 依存の解決が難しいため「--ignore-platform-req=php」を入れました。 $ docker-compose exec ec-cube php -v
PHP 8.1.27 (cli) (built: Feb 1 2024 02:59:09) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.27, Copyright (c) Zend Technologies
with Zend OPcache v8.1.27, Copyright (c), by Zend Technologies
$ git show --format='%H' --no-patch
1101e98ebc5520f4e89ce0d04f65fa2f5bfb986e
---------------- Seasoft こちらでの投稿は、アイディア程度に留めさせていただいております。 個別案件の作業は有償で承っております。お気軽にご相談ください。
|
|
|
seasoft |
投稿日時: 2024/3/28 13:33
対応状況: −−−
|
神 登録日: 2008/6/4 居住地: 投稿: 7369 |
Re: E2E テスト実行環境 > 実行すると、実行結果やエラーは表示されません。 以下の要領で、何らかの文字を echo すると、出力を得られました。 data/vendor/symfony/dependency-injection/Compiler/AbstractRecursivePass.php
public function process(ContainerBuilder $container)
{
$this->container = $container;
try {
$this->processValue($container->getDefinitions(), true);
+ } catch (\Exception $e) {
+ echo "\n";
} finally {
$this->container = null;
}
}
(追記) ※ デバッグ中に偶然この箇所で echo していましたが、多分この箇所にあまり意味はなく、他でも echo していれば同様とは推測しています。
root@582a29388c33:/var/www/app# data/vendor/bin/eccube
Console Tool
Usage:
command [options] [arguments]
Options:
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
In ContainerBuilder.php line 610:
Cannot autowire service "Eccube2\Command\Install\InsertDataCommand": argument "$eventDispatcher" of method "__construct()" references interface "
Symfony\Component\EventDispatcher\EventDispatcherInterface" but no such service exists. You should maybe alias this interface to the existing "ev
ent_dispatcher" service.
list [--raw] [--format FORMAT] [--] [<namespace>]
出力形式は変わったものの、結局先日の Exception と同じことが書かれていると認識しています。 以下と類似していそうですが、何をすべきか分からないです。 https://symfonycasts.com/screencast/symfony-3.3/autowiring-aliases#letting-symfony-tell-you-about-autowiring-failures ---------------- Seasoft こちらでの投稿は、アイディア程度に留めさせていただいております。 個別案件の作業は有償で承っております。お気軽にご相談ください。
|
|
|
nanasess |
投稿日時: 2024/4/9 1:23
対応状況: −−−
|
神 登録日: 2006/9/9 居住地: 投稿: 2325 |
Re: E2E テスト実行環境 composer update 'symfony/*' -W を実行して、symfony のバージョンアップをしてみるといかがでしょうか? まだ実験段階ですが、環境変数 HTTP_PROXY を設定しない場合は、 OWASP ZAP を使用せずにE2Eテストを実行できるようにしてみてます。 https://github.com/EC-CUBE/ec-cube2/pull/886これでセットアップが楽になるといいのですが。。。
|
|
|
seasoft |
投稿日時: 2024/4/9 20:35
対応状況: −−−
|
神 登録日: 2008/6/4 居住地: 投稿: 7369 |
Re: E2E テスト実行環境 引用: composer update 'symfony/*' -W を実行して、symfony のバージョンアップをしてみるといかがでしょうか?
「Nothing to install, update or remove」となり、アップデート対象は無いようでした。 https://github.com/nanasess/eccube2-fixture-generator/issues/11 を登録したタイミングでは一時的に eccube:fixtures:generate が通っていたのですが、再度構成すると「argument "$eventDispatcher" of method "__construct()" references interface」が再発しています。 引用: docker-compose.owaspzap.yml を外してビルドして、HTTPS_PROXY HTTP_PROXY をセットせず、yarn test:e2e --workers=1 e2e-tests を実行しますと、以下の「RequestError: Error: getaddrinfo ENOTFOUND zap」が複数発生する状況でした。 $ yarn test:e2e --workers=1 e2e-tests
yarn run v1.22.21
warning package.json: License should be a valid SPDX license expression
$ playwright test --grep-invert '(@attack|@extends)' --workers=1 e2e-tests
[@faker-js/faker]: faker.name is deprecated since v8.0 and will be removed in v10.0. Please use faker.person instead.
[@faker-js/faker]: faker.datatype.number() is deprecated since v8.0 and will be removed in v9.0. Please use faker.number.int() instead.
Running 125 tests using 1 worker
1) [chromium] › test/admin/contents/recommendsearch.test.ts:27:7 › おすすめ商品管理を確認します › おすすめ商品管理画面を確認します
RequestError: Error: getaddrinfo ENOTFOUND zap
at RequestError (/home/****/node_modules/request-promise-core/lib/errors.js:14:15)
at Request.plumbing.callback (/home/****/node_modules/request-promise-core/lib/plumbing.js:87:29)
at Request.RP$callback (/home/****/node_modules/request-promise-core/lib/plumbing.js:46:31)
at self.callback (/home/****/node_modules/request/request.js:185:22)
at Request.onRequestError (/home/****/node_modules/request/request.js:877:8)
[2/125] [chromium] › test/admin/contents/recommendsearch.test.ts:34:9 › おすすめ商品管理を確認します › カテゴリ検索を確認します › おすすめ商品(1)の編 [3/125] [chromium] › test/admin/contents/recommendsearch.test.ts:41:9 › おすすめ商品管理を確認します › カテゴリ検索を確認します › カテゴリ検索を確認し[4/125] [chromium] › test/admin/contents/recommendsearch.test.ts:49:9 › おすすめ商品管理を確認します › カテゴリ検索を確認します › おすすめ商品(1)を変 [5/125] [chromium] › test/admin/contents/recommendsearch.test.ts:60:9 › おすすめ商品管理を確認します › 商品コード検索を確認します › おすすめ商品(2)の [6/125] [chromium] › test/admin/contents/recommendsearch.test.ts:67:9 › おすすめ商品管理を確認します › 商品コード検索を確認します › 商品コード検索を確[7/125] [chromium] › test/admin/contents/recommendsearch.test.ts:75:9 › おすすめ商品管理を確認します › 商品コード検索を確認します › おすすめ商品(2)を 2) [chromium] › test/admin/customer/edit.test.ts:13:7 › 会員登録画面のテストをします › 会員登録画面のテストをします ──────────
RequestError: Error: getaddrinfo ENOTFOUND zap
at RequestError (/home/****/node_modules/request-promise-core/lib/errors.js:14:15)
at Request.plumbing.callback (/home/****/node_modules/request-promise-core/lib/plumbing.js:87:29)
at Request.RP$callback (/home/****/node_modules/request-promise-core/lib/plumbing.js:46:31)
at self.callback (/home/****/node_modules/request/request.js:185:22)
at Request.onRequestError (/home/****/node_modules/request/request.js:877:8)
なお、nanasess/improve-e2e をチェックアウトして、nanasess/use-php-faker をマージしています。 $ git switch --detach nanasess/improve-e2e
$ git merge --no-edit nanasess/use-php-faker
---------------- Seasoft こちらでの投稿は、アイディア程度に留めさせていただいております。 個別案件の作業は有償で承っております。お気軽にご相談ください。
|
|
|
nanasess |
投稿日時: 2024/4/9 23:11
対応状況: −−−
|
神 登録日: 2006/9/9 居住地: 投稿: 2325 |
Re: E2E テスト実行環境 ご確認ありがとうございます! 引用: docker-compose.owaspzap.yml を外してビルドして、HTTPS_PROXY HTTP_PROXY をセットせず、yarn test:e2e --workers=1 e2e-tests を実行しますと、以下の「RequestError: Error: getaddrinfo ENOTFOUND zap」が複数発生する状況でした。
申し訳ございません。まだ作業中でして、admin/index のみ対応しています。 以下のコマンドで正常に実行できるかお試しいただけますでしょうか?
yarn test:e2e e2e-tests/test/admin/index.test.ts
|
|
|
seasoft |
投稿日時: 2024/4/10 11:55
対応状況: −−−
|
神 登録日: 2008/6/4 居住地: 投稿: 7369 |
Re: E2E テスト実行環境 引用: 以下のコマンドで正常に実行できるかお試しいただけますでしょうか?
yarn test:e2e e2e-tests/test/admin/index.test.ts
無事にパスしたようです。 $ yarn test:e2e e2e-tests/test/admin/index.test.ts
yarn run v1.22.21
warning package.json: License should be a valid SPDX license expression
$ playwright test --grep-invert '(@attack|@extends)' e2e-tests/test/admin/index.test.ts
Running 1 test using 1 worker
1 passed (11.4s)
Done in 11.91s.
---------------- Seasoft こちらでの投稿は、アイディア程度に留めさせていただいております。 個別案件の作業は有償で承っております。お気軽にご相談ください。
|
|
|
nanasess |
投稿日時: 2024/4/10 12:16
対応状況: −−−
|
神 登録日: 2006/9/9 居住地: 投稿: 2325 |
Re: E2E テスト実行環境 よかったです。こちらも改修すすめたいと思います
|
|
|