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

[Improvement]: Introduce a way to run tests in a docker container #41036

Closed
azinneera opened this issue Jul 17, 2023 · 3 comments · Fixed by #42183
Closed

[Improvement]: Introduce a way to run tests in a docker container #41036

azinneera opened this issue Jul 17, 2023 · 3 comments · Fixed by #42183
Assignees
Labels
Area/ProjectAPI Team/DevTools Ballerina Developer Tooling ( CLI, Test FW, Package Management, OpenAPI, APIDocs ) Type/Improvement
Milestone

Comments

@azinneera
Copy link
Contributor

azinneera commented Jul 17, 2023

Description

We have bal build --cloud but not bal test --cloud but to verify the package functionality in a cloud platform, we must run the tests also in a container. This applies to GraalVM verification as well. bal test --graalvm --cloud should run the tests in a container.

For this, there should be a standalone testable jar that can be run inside a container. We can check the possibility of generating a single testable jar or separate jars for each module.

@ballerina-bot ballerina-bot added needTriage The issue has to be inspected and labeled manually userCategory/Compilation labels Jul 17, 2023
@azinneera azinneera added Team/DevTools Ballerina Developer Tooling ( CLI, Test FW, Package Management, OpenAPI, APIDocs ) and removed needTriage The issue has to be inspected and labeled manually userCategory/Compilation labels Jul 17, 2023
@Dilhasha Dilhasha assigned Dilhasha and unassigned ShammiL Jan 19, 2024
@Dilhasha
Copy link
Contributor

Dilhasha commented Jan 19, 2024

Following are the sub tasks for $subject.

  • Create an uber jar for test modules
  • Create test executable task and emit executable
  • Verify code-coverage, mocking with the new test executable
  • Lifecycle plugin implementation at C2C for running tests in docker container
  • Support running tests in docker container when --graalvm --cloud
  • Add test cases to cover above

@Dilhasha
Copy link
Contributor

@Ramith-D-Rodrigo

Let's create a spreadsheet with all the cases we need to address

@Dilhasha Dilhasha removed their assignment Apr 1, 2024
@Ramith-D-Rodrigo
Copy link
Contributor

--graalvm --cloud=docker is supported now. Implemented using the testable fat jar while also considering the mocking features.

Added the relevant tests for the changes. --cloud flag changes are added in c2c repository. The tests added in this repo check the changes in BTestMain and the execution of testable fat jar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area/ProjectAPI Team/DevTools Ballerina Developer Tooling ( CLI, Test FW, Package Management, OpenAPI, APIDocs ) Type/Improvement
Projects
Archived in project
5 participants