0
0
Fork 0
mirror of https://codeberg.org/forgejo/docs.git synced 2024-11-24 18:09:26 -05:00
forgejo-docs/docs/contributor/testing.md
Otto Richter 64fe34712f Update contributing sections (#821)
Rename Developer to Contributor guide
- I believe this sounds more inclusive and likely improves the diversity of contributors.
Separate translation section
clarify external resources
Add links to UI/UX and user research repos
Separate issue tracker and discussions
- I imagine this is part of the confusion for people who report bugs to the discussion tracker.
Add welcome section

Reviewed-on: https://codeberg.org/forgejo/docs/pulls/821
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Otto Richter <git@otto.splvs.net>
Co-committed-by: Otto Richter <git@otto.splvs.net>
2024-08-25 16:15:48 +00:00

2.4 KiB

title license
Testing CC-BY-SA-4.0

A reasonable effort should be made to test changes proposed to Forgejo.

Running the tests from sources

To run automated frontend and backend tests:

make test

Frontend tests

See the e2e README.

Interactive testing

To run and continuously rebuild when the source files change:

TAGS='sqlite sqlite_unlock_notify' make watch

NOTE: do not set the bindata tag such as in TAGS="bindata" make watch or the browser may fail to load pages with an error like Failed to load asset

Manual run of the binary

After following the steps to compile from source, a forgejo binary will be available in the working directory. It can be tested from this directory or moved to a directory with test data. When Forgejo is launched manually from command line, it can be killed by pressing Ctrl + C.

./forgejo web

Automated tests

In the Forgejo repository

When a pull request is opened, it will run workflows found in the .forgejo/workflows directory.

In the end-to-end repository

Some tests are best served by running Forgejo from a compiled binary, for instance to verify the result of a workflow run by the Forgejo runner. They can be run by adding the run-end-to-end-test label to the pull request. It will:

  • compile a binary from the pull request
  • open a pull request against the end-to-end repository
  • use the compiled binary to run the tests
  • report back failure or success

Debugging locally

A workflow can be run locally by installing the Forgejo runner and using the command line:

forgejo-runner exec --workflows .forgejo/workflows/testing.yml

Manual testing

When the change to be tested lacks the proper framework, the manual test steps must be documented in the description of the pull request.

Changes that are associated with manual tests must be labeled labeled "test/manual".