enso/test/Base_Tests
Pavel Marek 21e1284086
Enso tests can be run with filter from cmdline (#9065)
Simplify the `Test.Suite.run_with_filter` to accept a single filter parameter that searches for all the groups and specs that matches that filter. This filter can be a simple text provided from the command line.

# Important Notes
- Pending groups are now printed at the end of the run
- `Test.Suite.run_with_filter` is simplified to accept a single filter parameter that is either `Text` or `Nothing`. See the docs.
- Passing a filter from the command line is therefore straightforward, it is treated as a regex.
- For convenience, I have left all the `main` methods in all the test sources. I have just refactored them to accept the `filter` argument from the command line.
- For example, to run only a single spec from `Vector_Spec.enso`, invoke `enso --run test/Base_Tests/src/Data/Vector_Spec.enso "should allow vector creation with a programmatic constructor"`
- **Majority of the PR is a regex replace** of `^main =` for `main filter=Nothing =` and of `suite.run_with_filter` for `suite.run_with_filter filter`.
- **Fixed some internal engine bugs:**
- `AtomWithHole` allows to specify only one hole - https://github.com/enso-org/enso/pull/9065/files#diff-0f7bb7e85cf86a965de133aa7e6b5958ceb889bd1921c01e00d3a9ceb19626ef
- NaN keys in hash maps are handled in polyglot maps as well - c5257f6c2b78f893214ff67300893b593ea05e21..db4b3c0e9828ee79208d52e02586b24bb845b0d6
2024-02-22 12:31:44 +00:00
..
data Rename Tests to Base_Tests to be more descriptive (#8781) 2024-01-17 16:19:19 +01:00
polyglot-sources/enso-test-java-helpers/src/main/java/org/enso Refactoring the Unary operations so uncoupled from Storage. (#9090) 2024-02-19 17:11:52 +00:00
src Enso tests can be run with filter from cmdline (#9065) 2024-02-22 12:31:44 +00:00
package.yaml Rename Tests to Base_Tests to be more descriptive (#8781) 2024-01-17 16:19:19 +01:00
README.md Rename Tests to Base_Tests to be more descriptive (#8781) 2024-01-17 16:19:19 +01:00

This is a set of tests for the Base library for Enso.

HTTP tests

The run test suite for the HTTP component requires an active helper server on the localhost. If it is present, the port it listens to should be provided by setting the ENSO_HTTP_TEST_HTTPBIN_URL environment variable to a value like http://localhost:8080. The URL may contain a trailing slash.

To run the test server, you may use the following command:

sbt 'http-test-helper/run localhost 8080'

You can stop the server via Ctrl-C.

See the server's documentation for more information.

Cloud tests

By default, a subset of cloud tests runs whenever the ENSO_HTTP_TEST_HTTPBIN_URL environment variable is set, using a mock of parts of the cloud logic running on the helper server.

To run a full set of cloud tests against a real deployment, you need to set the following 3 environment variables:

  • ENSO_CLOUD_API_URI to point to the root of the cloud API,
  • ENSO_CLOUD_CREDENTIALS_FILE to be a path to a file containing the credentials to use, e.g. ~/.enso/credentials,
  • ENSO_RUN_REAL_CLOUD_TEST=1 to tell the test suite to run against a real cloud deployment.

Note that some cloud tests (e.g. testing secrets in HTTP requests) still require the ENSO_HTTP_TEST_HTTPBIN_URL setup, even if running against a real cloud deployment.