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

[Bug]: Codecoverge --exclude doesn't allow to pass file names with commas #40211

Open
gayaldassanayake opened this issue Apr 12, 2023 · 0 comments
Labels
Area/TestFramework Team/DevTools Ballerina Developer Tooling ( CLI, Test FW, Package Management, OpenAPI, APIDocs ) Type/Bug

Comments

@gayaldassanayake
Copy link
Contributor

Description

From update 6 onwards, testerina supports a new feature that allows to exclude files from the code coverage report.

The format of the command is bal test --code-coverage --excludes=<source_path1>,<source_path2>.

However, when the name of the source file that has a comma is given as a value to the --excludes flag, it splits the file name from the comma and identifies as two files.

Steps to Reproduce

  1. Create a new ballerina project with tests
  2. Create a source file named source,file.bal
  3. Run the command bal test --test-report --code-coverage --excludes='source,file.bal' --coverage-format=xml
  4. The output is as follows
  Compiling source
          gayaldassanayake/covexclude:0.1.0
  WARNING: **/comma/**, **/file.bal are skipped.
  
  Running Tests with Coverage
  
          covexclude
  
  
                  1 passing
                  0 failing
                  0 skipped
  
  Generating Test Report
          /Users/gayaldassanayake/Documents/practice/sprint77/covexclude/target/report/test_results.json
  
          View the test report at: file:///Users/gayaldassanayake/Documents/practice/sprint77/covexclude/target/report/index.html

Affected Version(s)

2201.6.0

OS, DB, other environment details and versions

MacOS

Related area

-> Test Framework

Related issue(s) (optional)

#27158

Suggested label(s) (optional)

No response

Suggested assignee(s) (optional)

No response

@ballerina-bot ballerina-bot added the Team/DevTools Ballerina Developer Tooling ( CLI, Test FW, Package Management, OpenAPI, APIDocs ) label Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area/TestFramework Team/DevTools Ballerina Developer Tooling ( CLI, Test FW, Package Management, OpenAPI, APIDocs ) Type/Bug
Projects
None yet
Development

No branches or pull requests

2 participants