-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Possible to exclude the testng-assert module when using testng #3197
Comments
Currently, TestNG is released into a single artifact, but the project is already modularized and assertions are in their own module. @krmahadevan WDYT Related to #2649 |
@juherr - That would mean that we would need to do 3 artifact releases
Is this what we are looking at ? |
Only assertions and testng without assertions. It means the upgrade will need to add assertions as dependencies if used. |
Wouldn't that cause backward compatibility issues for users? Yes, we can send out announcements etc., but just calling out. Should we do this as part of a minor release or a major release? |
I agree, release the assert library as a separate artifact. |
@krmahadevan yes, it will make a little regression that must be documented |
@juherr is it accepted? |
@mpet I think it will accepted when someone will propose a pull request for that. |
@juherr I guess we need to exclude the asserts from shaded jar too. Maybe it should not be included at all. What do you say? |
@mpet excluded from the shaded jar and deployed as a standalone artifact. |
ok. @juherr Any input on what should be in the build file for testng-asserts. I guess some of the stuff in |
I cannot see where the 'publish' is done So I would need your assistance of what parts to include the ..\git\testng\testng-asserts\testng-asserts-build.gradle.kts I have added this, so far:
What am I missing? How can I test a release and make sure it has the correct info? |
@krmahadevan do you know the release process and which parts that I need? |
@mpet - The release process is documented here: https://github.com/testng-team/testng/wiki/TestNG-release-process I believe that we would perhaps need to create a github actions workflow that would release assert library. @vlsi - It would be good if you could help share some guidance around here. |
yes it seems to have a dedicated flow where you set the RC to be released. Not sure what is need in the build to support this. But I hope @vlsi can shed some light in this matter... |
@krmahadevan is @vlsi still active? How can we make this go forward... |
@mpet - Vlad helped setup the build system for TestNG. He can help more aptly. Given that this is a holiday season I would expect latency in people responding. I am not well versed with Gradle as a build system so I don't have an answer and will need to spend time trying to figure out. So we wait till @vlsi gets back or you can try taking a jab at this. |
The key question is the way to handle backward compatibility. We could move asserts to a different artifact, and use it as a regular dependency. The sad thing is that ideally, different jars should not have the same packages. Unfortunately, the migration from In other words: Current state: TestNG 7.10.2 TestNG 8.0.0 TestNG 9.0.0 TestNG 15.0.0 WDYT? |
Thanks for the feedback. What if "org.testng.assertions.Assert" is introduced and "org.testng.Assert" is deprecated in the next minor release? What if "org.testng.assertions" is moved into its dedicated artifact, and core depends on it in the next minor release? Both moves should not break anything, right? |
Sure it is possible to combine the changes. I just assumed it would take some time to add By the way, my plan missed a release that would exclude "testng-assertions" from the default dependency of testng.jar. |
Right. It can break with cli runner. Then I propose to create the new artifact with the new package, and deprecate assertions from the base package in a next minor version. And remove deprecated in the next major as usual. Wdyt @krmahadevan ? |
So in TestNG
In TestNG Is this a fair understanding of the expectations here? |
I would ask you not doing so. |
@vlsi Personally I wouldn't bother removing Asserts at all. A test runner is supposed to provide the basic assertion capabilities. If someone doesn't want to use them then they can always use something else. It's just a matter of preference. But the ask in this issue itself was that, they felt it was not an optimal experience. If we are going to keep the assertion classes for that long then we might as well not remove them 🫣 I don't have a strong opinion on this either way because there are straightforward ways of avoiding it, ranging from code reviews that enforce this avoidance to using the enforcer plug-in to ensure that the testng powered asserts are not used in the code base. I was merely trying to figure out the list of activities that need to be done ( along with some timelines ) to accomplish the ask in this issue. |
TestNG Version
v7.10.2
Suggestion
Hi
In our team we discussed this:
Our majority of TestNG testcases uses https://joel-costigliola.github.io/assertj/ for assertions.
But when users write TestNG unit tests the first alternative that pops up is org.testng.Assert.
Would it be possible to make this module optional? This is especially important for users that
use TestNG for executing tests and assertj to assert.
br,
//mikael
The text was updated successfully, but these errors were encountered: