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]: Disabling Tests with Dependencies Does Not Work #43767

Open
ThisaruGuruge opened this issue Jan 26, 2025 · 0 comments
Open

[Bug]: Disabling Tests with Dependencies Does Not Work #43767

ThisaruGuruge opened this issue Jan 26, 2025 · 0 comments
Labels
Area/TestFramework Team/DevTools Ballerina Developer Tooling ( CLI, Test FW, Package Management, OpenAPI, APIDocs ) Type/Bug

Comments

@ThisaruGuruge
Copy link
Member

ThisaruGuruge commented Jan 26, 2025

Description

When a test function has a dependency, the disable-groups flag does not disable the test with the provided group.

Steps to Reproduce

Consider the following test:

import ballerina/test;

@test:Config {
    groups: ["group1"]
}
isolated function test1() {
    test:assertTrue(true, "message");
}

@test:Config {
    groups: ["group2"]
}
isolated function test2() {
    test:assertTrue(true, "message");
}

@test:Config {
    groups: ["group1", "group2"],
    dependsOn: [test2]
}
isolated function test3() {
    test:assertTrue(true, "message");
}

When we run

bal test --disable-groups=group2

All the three tests are run because the test3 depends on test2. Ideally it should not run the test2 and test3.

Affected Version(s)

No response

OS, DB, other environment details and versions

No response

Related area

-> Test Framework

Related issue(s) (optional)

No response

Suggested label(s) (optional)

No response

Suggested assignee(s) (optional)

No response

@ballerina-bot ballerina-bot added Team/DevTools Ballerina Developer Tooling ( CLI, Test FW, Package Management, OpenAPI, APIDocs ) Area/TestFramework labels Jan 26, 2025
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