Closed v91negi closed 1 year ago
please suugest for this
do you have the same issue if run the test with build tool like maven or gradle?
i didn't test in other build tool but i convert project to maven, it still occur
On Thu, May 4, 2023 at 9:05 PM Nick Tan @.***> wrote:
do you have the same issue if run the test with build tool like maven or gradle?
— Reply to this email directly, view it on GitHub https://github.com/testng-team/testng-eclipse/issues/549#issuecomment-1534995551, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC6M5DFOXWJIHGACX5JLDYTXEPEFBANCNFSM6AAAAAAXAGOMSY . You are receiving this because you authored the thread.Message ID: @.***>
@missedone -
accessible: module Tryagain does not "exports Tryagain1" to module org.testng
This looks like there is Java modules involved.
@v91negi - Do you have a module-info.java
in your project somewhere? What happens when you delete this file and try again?
Ok, I will check.
On Fri, 5 May 2023, 07:55 Krishnan Mahadevan, @.***> wrote:
@missedone https://github.com/missedone -
accessible: module Tryagain does not "exports Tryagain1" to module org.testng
This looks like there is Java modules involved.
@v91negi https://github.com/v91negi - Do you have a module-info.java in your project somewhere? What happens when you delete this file and try again?
— Reply to this email directly, view it on GitHub https://github.com/testng-team/testng-eclipse/issues/549#issuecomment-1535617987, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC6M5DHXTDI3PMWQSVDQME3XERQJZANCNFSM6AAAAAAXAGOMSY . You are receiving this because you were mentioned.Message ID: @.***>
Thank you ,after deleting module info file. Issue resolved and test case pass, as below:-
[RemoteTestNG] detected TestNG version 7.7.0
300
160
450
PASSED: Tryagain.files.sumValidationtest.sumofCourses
===============================================
Default test
Tests run: 1, Failures: 0, Skips: 0
===============================================
===============================================
Can you share more details about this, why module_info.java causing error?
@v91negi - If you have a module-info.java
then it means that you are trying to leverage the modularisation capabilities that JDK9 and above provide. modules are basically a higher level grouping on top of package
. Until JDK8 one could group classes into a package
and there was no further grouping that was possible. JDK9 introduced the notion of modules
wherein you could basically group a bunch of package
into module
.
I suggest that you read a bit about module
so that it clears out the concept. After that the error message should be self explanatory. In a nutshell, you defined a module-info.java
and so Java started expecting that you would tell which all packages are to be visible to the outside world (and to TestNG since TestNG also would be part of the outside world). Since nothing was visible and since TestNG is trying to access your packages, Java flags this as a problem.
Problem Statement
please read https://github.com/cbeust/testng-eclipse/blob/master/docs/Troubleshooting.md first An error occurred while instantiating class Tryagain1.sumValidation: Unable to make public Tryagain1.sumValidation() accessible: module Tryagain does not "exports Tryagain1" to module org.testng
Any relate message in "Error Log" view
The Dependency Management tool for your project
Operating System :-