ballerina-platform / ballerina-lang

The Ballerina Programming Language
https://ballerina.io/
Apache License 2.0
3.68k stars 752 forks source link

Provide functionality to package tests in testerina #23418

Closed BuddhiWathsala closed 1 year ago

BuddhiWathsala commented 4 years ago

Description: When I tried to implement websub related tests, it occurs to me that having the $subject would be an ideal case to implement advanced tests. For example, handling this kind of configurations.

[1] https://github.com/ballerina-platform/ballerina-lang/blob/master/tests/jballerina-integration-test/src/test/resources/testng.xml#L251

Steps to reproduce: The functionality would be ideal when we try to implement this [2] kind of test in testerina. The reason is websub only contains a static hub and we cannot test different configurations of websub hub within a single packaged test cases.

[2] https://github.com/ballerina-platform/ballerina-lang/tree/master/tests/jballerina-integration-test/src/test/resources/websub/publisher/src

Affected Versions: 1.3.0-SNAPSHOT

azinneera commented 1 year ago

In ballerina, a module is considered a test suite and the user can give configurations inline with the test cases which is similar to the testng.xml in TestNG in Java. There are also options to enable/disable groups or to execute a certain set of tests with the CLI. Refer bal test --help for more information.