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

Insist on luatest #23

Open
Totktonada opened this issue Jun 23, 2022 · 0 comments
Open

Insist on luatest #23

Totktonada opened this issue Jun 23, 2022 · 0 comments
Labels
feature A new functionality

Comments

@Totktonada
Copy link
Member

Tarantool test suite contains tests written using different approaches.

Four test types in test-run (source)

In test-run (the test framework that we use in tarantool/tarantool) we have four types of tests (named below according to the core field in the suite.ini file):

  • core = tarantool: read a test file and feed it line-by-line1 to tarantool console. A text of requests and responses is squashed and compared against a reference file. Often called diff-based based testing.
  • core = app: just Lua script. Usually produces TAP13 output using built-in tap module (and so often called tap-based testing), which is validated by test-run without a reference file. If a test produces non-TAP13 output, stdout is compared against a reference file.
  • core = unittest: just executable files. May be TAP13 compliant (after some work) or diff based.
  • core = luatest: calls luatest <...> /path/to/foo_test.lua, where luatest is configured to produce TAP13 output. (Reasoning.)

Some time ago we agreed to write new tests using the luatest framework, because it allows to make the testing code more structed using explicit asserts and before/after test hooks.

This agreement is not obvious for the new employees and external contributors. I propose to add a check that allows to add only unittest and luatest tests. Changing of existing tests, of course, should be allowed.

See also tarantool/test-run#304.

Footnotes

  1. Multiline statements should be marked explicitly either by set delimiter test-run command or using a backslash at end of line.

@Totktonada Totktonada added the feature A new functionality label Jun 23, 2022
ligurio added a commit that referenced this issue Sep 2, 2022
ligurio added a commit that referenced this issue Sep 2, 2022
ligurio added a commit that referenced this issue Sep 2, 2022
ligurio added a commit that referenced this issue Sep 2, 2022
locker pushed a commit that referenced this issue Sep 2, 2022
ligurio added a commit that referenced this issue Sep 5, 2022
ligurio added a commit that referenced this issue Sep 6, 2022
ligurio added a commit that referenced this issue Sep 6, 2022
locker pushed a commit that referenced this issue Sep 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new functionality
Projects
None yet
Development

No branches or pull requests

1 participant