Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Steps to set up automated tests are incomplete

オープン
#385 コメント 6 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜2日
初心者へのやさしさ
48/100
issue の種類
ドキュメント
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
php

調査の方向性

まず、issue にリンクされているドキュメントページ「Getting Started Part 1」と「Tests PHP」を確認し、その後 tests/PHPUnit/bootstrap.php と記載されているコンソールコマンドを調べます。テスト設定、データベース名と権限、fixture のセットアップ、テストの実行手順をリポジトリと照合して確認します。開発者が文書化された手順に従ってテストを正常に準備・実行でき、bootstrap に関する疑問が解決されていれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Documentation

It's not currently possible to set up the following the instructions provided either here: https://developer.matomo.org/guides/getting-started-part-1 or here: https://developer.matomo.org/guides/tests-php

The steps/assumptions that are missing or incorrect are as follows:

  1. In the config, under [tests], request_uri must be set up correctly or the tests won't run.
  2. The default database name is matomo_tests, not piwik_tests as mentioned on the "Getting Started" page.
  3. The docs should mention that the database user specified under [database_tests] should have CREATE/DROP DATABASE privileges - I think the underlying assumption is that everyone uses the root user.
  4. Just creating the tests database is not enough, it must be populated for the tests to run successfully - this can be achieved by running ./console tests:setup-fixture OmniFixture.

And once all of the above is done, it's time to run ./console tests:run unit, etc. I'd be very happy to create a pull request with the edited docs.

Additionally, there is code in https://github.com/matomo-org/matomo/blob/4.x-dev/tests/PHPUnit/bootstrap.php that should set up at least the config variables for the developer on the first run, however it doesn't actually work as it attempts to connect to the test database which is not yet set up - is it worth opening an issue for that or is it outdated code that should be scrapped rather than fixed?

主要言語
PHP
スター
58
フォーク
88
平均マージ
2日 10時間
マージ済み PR(30日)
2

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

matomo-org/developer-documentation のほかの issue

matomo-org/developer-documentation の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。