Gallio not working for test project in sonar 3.5

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Gallio not working for test project in sonar 3.5

Guru
Hi,

i have been recently updated sonar 2.14 to 3.5. while ruuning the one of the solution it's throwing the following error. kindly help me out to reslove

[exec] 06:11:37.266 INFO  p.PhasesTimeProfiler - Sensor org.sonar.plugins.csharp.gallio.GallioSensor@119c297...
     [exec] 06:11:37.266 INFO        org.sonar.INFO - The old .NET parameter 'sonar.dotnet.buildConfigurations' has been found and will be used. Its value: 'Release'
     [exec] 06:11:37.266 WARN  s.p.c.g.GallioSensor - Test assembly not found at the following location: D:\apps\Sonar-DotNet\AP-Case- Management\Applications\Archer.TCM.IntegrationServices\Archer.TCM.IMNService.TestConsole\Archer.TCM.IMNService.TestConsole.exe
     [exec] , using the following configuration:
     [exec]   - csproj file: D:\apps\Sonar-DotNet\AP-Case- Management\Applications\Archer.TCM.IntegrationServices\Archer.TCM.IMNService.TestConsole\Archer.TCM.IMNService.TestConsole.csproj
     [exec]   - build configuration: Release
     [exec]   - platform: Any CPU
     [exec] 06:11:37.297 INFO        org.sonar.INFO - The old .NET parameter 'sonar.dotnet.buildConfigurations' has been found and will be used. Its value: 'Release'
     [exec] 06:11:37.297 WARN  s.p.c.g.GallioSensor - Test assembly not found at the following location: D:\apps\Sonar-DotNet\AP-Case- Management\Applications\Archer.TCM.IntegrationServices\Archer.TCM.IntegrationServices.TestConsole\Archer.TCM.IntegrationServices.TestConsole.exe
     [exec] , using the following configuration:
     [exec]   - csproj file: D:\apps\Sonar-DotNet\AP-Case- Management\Applications\Archer.TCM.IntegrationServices\Archer.TCM.IntegrationServices.TestConsole\Archer.TCM.IntegrationServices.TestConsole.csproj
     [exec]   - build configuration: Release
     [exec]   - platform: Any CPU
     [exec] 06:11:37.297 INFO        org.sonar.INFO - The old .NET parameter 'sonar.dotnet.buildConfigurations' has been found and will be used. Its value: 'Release'
     [exec] 06:11:37.297 WARN  s.p.c.g.GallioSensor - Test assembly not found at the following location: D:\apps\Sonar-DotNet\AP-Case- Management\Applications\Archer.TCM.IntegrationServices\Archer.TCM.TeamMbrService.TestConsole\Archer.TCM.TeamMbrService.TestConsole.exe
     [exec] , using the following configuration:
     [exec]   - csproj file: D:\apps\Sonar-DotNet\AP-Case- Management\Applications\Archer.TCM.IntegrationServices\Archer.TCM.TeamMbrService.TestConsole\Archer.TCM.TeamMbrService.TestConsole.csproj
     [exec]   - build configuration: Release
     [exec]   - platform: Any CPU
     [exec] 06:11:37.313 INFO        org.sonar.INFO - The old .NET parameter 'sonar.dotnet.buildConfigurations' has been found and will be used. Its value: 'Release'
     [exec] 06:11:37.313 WARN  s.p.c.g.GallioSensor - Test assembly not found at the following location: D:\apps\Sonar-DotNet\AP-Case- Management\Applications\Archer.TCM.IntegrationServices\Archer.TCM.POSService.TestConsole\Archer.TCM.POSService.TestConsole.exe
     [exec] , using the following configuration:
     [exec]   - csproj file: D:\apps\Sonar-DotNet\AP-Case- Management\Applications\Archer.TCM.IntegrationServices\Archer.TCM.POSService.TestConsole\Archer.TCM.POSService.TestConsole.csproj
     [exec]   - build configuration: Release
     [exec]   - platform: Any CPU
     [exec] 06:11:37.313 INFO        org.sonar.INFO - The old .NET parameter 'sonar.dotnet.buildConfigurations' has been found and will be used. Its value: 'Release'
     [exec] 06:11:37.313 WARN  s.p.c.g.GallioSensor - Test assembly not found at the following location: D:\apps\Sonar-DotNet\AP-Case- Management\Applications\Archer.TCM.IntegrationServices\Archer.TCM.CEDSService.TestConsole\Archer.TCM.CEDSService.TestConsole.exe
     [exec] , using the following configuration:
     [exec]   - csproj file: D:\apps\Sonar-DotNet\AP-Case- Management\Applications\Archer.TCM.IntegrationServices\Archer.TCM.CEDSService.TestConsole\Archer.TCM.CEDSService.TestConsole.csproj
     [exec]   - build configuration: Release
     [exec]   - platform: Any CPU
     [exec] Exception in thread "main" org.sonar.batch.bootstrapper.BootstrapException: org.sonar.api.utils.SonarException: Gallio execution failed.
     [exec] at org.sonar.runner.Runner.delegateExecution(Runner.java:155)
     [exec] at org.sonar.runner.Runner.execute(Runner.java:58)
     [exec] at org.sonar.runner.Main.main(Main.java:52)
     [exec] Caused by: org.sonar.api.utils.SonarException: Gallio execution failed.
     [exec] at org.sonar.plugins.csharp.gallio.GallioSensor.executeRunner(GallioSensor.java:202)
     [exec] at org.sonar.plugins.csharp.gallio.GallioSensor.analyse(GallioSensor.java:167)
     [exec] at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:70)
     [exec] at org.sonar.batch.phases.Phases.execute(Phases.java:101)
     [exec] at org.sonar.batch.scan.ScanContainer.doStart(ScanContainer.java:147)
     [exec] at org.sonar.batch.bootstrap.Container.start(Container.java:72)
     [exec] at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:65)
     [exec] at org.sonar.batch.scan.ScanTask.scanRecursively(ScanTask.java:56)
     [exec] at org.sonar.batch.scan.ScanTask.scanRecursively(ScanTask.java:54)
     [exec] at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:49)
     [exec] at org.sonar.batch.bootstrap.TaskContainer.doStart(TaskContainer.java:188)
     [exec] at org.sonar.batch.bootstrap.Container.start(Container.java:72)
     [exec] at org.sonar.batch.bootstrap.TaskBootstrapContainer.executeTask(TaskBootstrapContainer.java:73)
     [exec] at org.sonar.batch.bootstrap.TaskBootstrapContainer.doStart(TaskBootstrapContainer.java:62)
     [exec] at org.sonar.batch.bootstrap.Container.start(Container.java:72)
     [exec] at org.sonar.batch.bootstrap.BootstrapContainer.doStart(BootstrapContainer.java:104)
     [exec] at org.sonar.batch.bootstrap.Container.start(Container.java:72)
     [exec] at org.sonar.batch.Batch.execute(Batch.java:106)
     [exec] at org.sonar.runner.Launcher.executeBatch(Launcher.java:60)
     [exec] at org.sonar.runner.Launcher.execute(Launcher.java:53)
     [exec] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     [exec] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
     [exec] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
     [exec] at java.lang.reflect.Method.invoke(Unknown Source)
     [exec] at org.sonar.runner.Runner.delegateExecution(Runner.java:152)
     [exec] ... 2 more
     [exec] Caused by: org.sonar.dotnet.tools.gallio.GallioException: No test assembly was found. Please check your project's Gallio plugin configuration.
     [exec] at org.sonar.dotnet.tools.gallio.GallioCommandBuilder.validateGallioInfo(GallioCommandBuilder.java:491)
     [exec] at org.sonar.dotnet.tools.gallio.GallioCommandBuilder.toCommand(GallioCommandBuilder.java:213)
     [exec] at org.sonar.dotnet.tools.gallio.GallioRunner.execute(GallioRunner.java:94)
     [exec] at org.sonar.plugins.csharp.gallio.GallioSensor.executeRunner(GallioSensor.java:199)
     [exec] ... 26 more
     

i have attached the detailed log here. gallioerror.txt
Reply | Threaded
Open this post in threaded view
|

Re: Gallio not working for test project in sonar 3.5

Fabrice Bellingard-4
Hi,

if your analysis was successful some time ago, then this means that the error you get is not related to Sonar upgrade from 2.14 to 3.5 but most probably to either a change in your code base or an update of the C#/.NET plugins.


Best regards,

Fabrice BELLINGARD | SonarSource
http://sonarsource.com


On Mon, May 27, 2013 at 5:44 PM, Guru <[hidden email]> wrote:
Hi,

i have been recently updated sonar 2.14 to 3.5. while ruuning the one of the
solution it's throwing the following error. kindly help me out to reslove

[exec] 06:11:37.266 INFO  p.PhasesTimeProfiler - Sensor
org.sonar.plugins.csharp.gallio.GallioSensor@119c297...
     [exec] 06:11:37.266 INFO        org.sonar.INFO - The old .NET parameter
'sonar.dotnet.buildConfigurations' has been found and will be used. Its
value: 'Release'
     [exec] 06:11:37.266 WARN  s.p.c.g.GallioSensor - Test assembly not
found at the following location: D:\apps\Sonar-DotNet\AP-Case-
Management\Applications\Archer.TCM.IntegrationServices\Archer.TCM.IMNService.TestConsole\Archer.TCM.IMNService.TestConsole.exe
     [exec] , using the following configuration:
     [exec]   - csproj file: D:\apps\Sonar-DotNet\AP-Case-
Management\Applications\Archer.TCM.IntegrationServices\Archer.TCM.IMNService.TestConsole\Archer.TCM.IMNService.TestConsole.csproj
     [exec]   - build configuration: Release
     [exec]   - platform: Any CPU
     [exec] 06:11:37.297 INFO        org.sonar.INFO - The old .NET parameter
'sonar.dotnet.buildConfigurations' has been found and will be used. Its
value: 'Release'
     [exec] 06:11:37.297 WARN  s.p.c.g.GallioSensor - Test assembly not
found at the following location: D:\apps\Sonar-DotNet\AP-Case-
Management\Applications\Archer.TCM.IntegrationServices\Archer.TCM.IntegrationServices.TestConsole\Archer.TCM.IntegrationServices.TestConsole.exe
     [exec] , using the following configuration:
     [exec]   - csproj file: D:\apps\Sonar-DotNet\AP-Case-
Management\Applications\Archer.TCM.IntegrationServices\Archer.TCM.IntegrationServices.TestConsole\Archer.TCM.IntegrationServices.TestConsole.csproj
     [exec]   - build configuration: Release
     [exec]   - platform: Any CPU
     [exec] 06:11:37.297 INFO        org.sonar.INFO - The old .NET parameter
'sonar.dotnet.buildConfigurations' has been found and will be used. Its
value: 'Release'
     [exec] 06:11:37.297 WARN  s.p.c.g.GallioSensor - Test assembly not
found at the following location: D:\apps\Sonar-DotNet\AP-Case-
Management\Applications\Archer.TCM.IntegrationServices\Archer.TCM.TeamMbrService.TestConsole\Archer.TCM.TeamMbrService.TestConsole.exe
     [exec] , using the following configuration:
     [exec]   - csproj file: D:\apps\Sonar-DotNet\AP-Case-
Management\Applications\Archer.TCM.IntegrationServices\Archer.TCM.TeamMbrService.TestConsole\Archer.TCM.TeamMbrService.TestConsole.csproj
     [exec]   - build configuration: Release
     [exec]   - platform: Any CPU
     [exec] 06:11:37.313 INFO        org.sonar.INFO - The old .NET parameter
'sonar.dotnet.buildConfigurations' has been found and will be used. Its
value: 'Release'
     [exec] 06:11:37.313 WARN  s.p.c.g.GallioSensor - Test assembly not
found at the following location: D:\apps\Sonar-DotNet\AP-Case-
Management\Applications\Archer.TCM.IntegrationServices\Archer.TCM.POSService.TestConsole\Archer.TCM.POSService.TestConsole.exe
     [exec] , using the following configuration:
     [exec]   - csproj file: D:\apps\Sonar-DotNet\AP-Case-
Management\Applications\Archer.TCM.IntegrationServices\Archer.TCM.POSService.TestConsole\Archer.TCM.POSService.TestConsole.csproj
     [exec]   - build configuration: Release
     [exec]   - platform: Any CPU
     [exec] 06:11:37.313 INFO        org.sonar.INFO - The old .NET parameter
'sonar.dotnet.buildConfigurations' has been found and will be used. Its
value: 'Release'
     [exec] 06:11:37.313 WARN  s.p.c.g.GallioSensor - Test assembly not
found at the following location: D:\apps\Sonar-DotNet\AP-Case-
Management\Applications\Archer.TCM.IntegrationServices\Archer.TCM.CEDSService.TestConsole\Archer.TCM.CEDSService.TestConsole.exe
     [exec] , using the following configuration:
     [exec]   - csproj file: D:\apps\Sonar-DotNet\AP-Case-
Management\Applications\Archer.TCM.IntegrationServices\Archer.TCM.CEDSService.TestConsole\Archer.TCM.CEDSService.TestConsole.csproj
     [exec]   - build configuration: Release
     [exec]   - platform: Any CPU
     [exec] Exception in thread "main"
org.sonar.batch.bootstrapper.BootstrapException:
org.sonar.api.utils.SonarException: Gallio execution failed.
     [exec]     at org.sonar.runner.Runner.delegateExecution(Runner.java:155)
     [exec]     at org.sonar.runner.Runner.execute(Runner.java:58)
     [exec]     at org.sonar.runner.Main.main(Main.java:52)
     [exec] Caused by: org.sonar.api.utils.SonarException: Gallio execution
failed.
     [exec]     at
org.sonar.plugins.csharp.gallio.GallioSensor.executeRunner(GallioSensor.java:202)
     [exec]     at
org.sonar.plugins.csharp.gallio.GallioSensor.analyse(GallioSensor.java:167)
     [exec]     at
org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:70)
     [exec]     at org.sonar.batch.phases.Phases.execute(Phases.java:101)
     [exec]     at
org.sonar.batch.scan.ScanContainer.doStart(ScanContainer.java:147)
     [exec]     at org.sonar.batch.bootstrap.Container.start(Container.java:72)
     [exec]     at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:65)
     [exec]     at
org.sonar.batch.scan.ScanTask.scanRecursively(ScanTask.java:56)
     [exec]     at
org.sonar.batch.scan.ScanTask.scanRecursively(ScanTask.java:54)
     [exec]     at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:49)
     [exec]     at
org.sonar.batch.bootstrap.TaskContainer.doStart(TaskContainer.java:188)
     [exec]     at org.sonar.batch.bootstrap.Container.start(Container.java:72)
     [exec]     at
org.sonar.batch.bootstrap.TaskBootstrapContainer.executeTask(TaskBootstrapContainer.java:73)
     [exec]     at
org.sonar.batch.bootstrap.TaskBootstrapContainer.doStart(TaskBootstrapContainer.java:62)
     [exec]     at org.sonar.batch.bootstrap.Container.start(Container.java:72)
     [exec]     at
org.sonar.batch.bootstrap.BootstrapContainer.doStart(BootstrapContainer.java:104)
     [exec]     at org.sonar.batch.bootstrap.Container.start(Container.java:72)
     [exec]     at org.sonar.batch.Batch.execute(Batch.java:106)
     [exec]     at org.sonar.runner.Launcher.executeBatch(Launcher.java:60)
     [exec]     at org.sonar.runner.Launcher.execute(Launcher.java:53)
     [exec]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     [exec]     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
     [exec]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
     [exec]     at java.lang.reflect.Method.invoke(Unknown Source)
     [exec]     at org.sonar.runner.Runner.delegateExecution(Runner.java:152)
     [exec]     ... 2 more
     [exec] Caused by: org.sonar.dotnet.tools.gallio.GallioException: No
test assembly was found. Please check your project's Gallio plugin
configuration.
     [exec]     at
org.sonar.dotnet.tools.gallio.GallioCommandBuilder.validateGallioInfo(GallioCommandBuilder.java:491)
     [exec]     at
org.sonar.dotnet.tools.gallio.GallioCommandBuilder.toCommand(GallioCommandBuilder.java:213)
     [exec]     at
org.sonar.dotnet.tools.gallio.GallioRunner.execute(GallioRunner.java:94)
     [exec]     at
org.sonar.plugins.csharp.gallio.GallioSensor.executeRunner(GallioSensor.java:199)
     [exec]     ... 26 more


i have attached the detailed log here.  gallioerror.txt
<http://sonar.15.x6.nabble.com/file/n5012770/gallioerror.txt>



--
View this message in context: http://sonar.15.x6.nabble.com/Gallio-not-working-for-test-project-in-sonar-3-5-tp5012770.html
Sent from the Sonar user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|

Re: Gallio not working for test project in sonar 3.5

Guru
Hi Fabrice,

thanks for your response.

here is my findings

when i execute C# plugin version 1.3 the gallio trying to run the test but couldn't run saying that "This test is not supported by any available test framework." and continuing the rest of the analysis without any issues.

the unit test is developed using .Net Framework 4.0 Client Profile. 

when i execute the C# plugin version 2.1 the gallio is throwing the exception and not continuing rest of the test.

any idea why the latest plugin version is not working or robust enough to handle the issues.?

or do i need to set any additional parameter in the configuration side.

Regards,
Gurumoorthy S
Reply | Threaded
Open this post in threaded view
|

Re: Gallio not working for test project in sonar 3.5

Fabrice Bellingard-4
Hi,

can you extract the executed Gallio command from the log and run it manually in a DOS shell? Then, just after you've done this, execute "echo %errorlevel%" to know which exit code is returned. 


Best regards,

Fabrice BELLINGARD | SonarSource
http://sonarsource.com


On Thu, May 30, 2013 at 10:12 AM, Guru <[hidden email]> wrote:
Hi Fabrice,

thanks for your response.

here is my findings

when i execute C# plugin version 1.3 the gallio trying to run the test but
couldn't run saying that "This test is not supported by any available test
framework." and continuing the rest of the analysis without any issues.

*the unit test is developed using .Net Framework 4.0 Client Profile.*

when i execute the C# plugin version 2.1 the gallio is throwing the
exception and not continuing rest of the test.

any idea why the latest plugin version is not working or robust enough to
handle the issues.?

or do i need to set any additional parameter in the configuration side.

Regards,
Gurumoorthy S



--
View this message in context: http://sonar.15.x6.nabble.com/Gallio-not-working-for-test-project-in-sonar-3-5-tp5012770p5012853.html
Sent from the Sonar user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|

Re: Gallio not working for test project in sonar 3.5

Guru
i have ran  the following command which is generated in 1.3 plugin

C:\Users\Z063794\AppData\Local\Apps\OpenCover\OpenCover.Console.exe -register:user -target:"C:\Program Files\Gallio\bin\Gallio.Echo.exe" -targetdir:"C:\Apps\Sonar-DotNet\AP-Case- Management\Applications\Archer.TCM.IntegrationServices\.sonar" "-targetargs:\"/r:IsolatedProcess\" \"/report-directory:C:\Apps\Sonar-DotNet\AP-Case- Management\Applications\Archer.TCM.IntegrationServices\.sonar\" \"/report-name-format:gallio-report\" \"/report-type:Xml\" \"C:\Apps\Sonar-DotNet\AP-Case- Management\Applications\Archer.TCM.IntegrationServices\Archer.TCM.IntegrationServices.TestConsole\bin\Release\Archer.TCM.IntegrationServices.TestConsole.exe\" \"C:\Apps\Sonar-DotNet\AP-Case- Management\Applications\Archer.TCM.IntegrationServices\Archer.TCM.IMNService.TestConsole\bin\Release\Archer.TCM.IMNService.TestConsole.exe\" \"C:\Apps\Sonar-DotNet\AP-Case- Management\Applications\Archer.TCM.IntegrationServices\Archer.TCM.POSService.TestConsole\bin\Release\Archer.TCM.POSService.TestConsole.exe\" \"C:\Apps\Sonar-DotNet\AP-Case- Management\Applications\Archer.TCM.IntegrationServices\Archer.TCM.CEDSService.TestConsole\bin\Release\Archer.TCM.CEDSService.TestConsole.exe\" \"C:\Apps\Sonar-DotNet\AP-Case- Management\Applications\Archer.TCM.IntegrationServices\Archer.TCM.TeamMbrService.TestConsole\bin\Release\Archer.TCM.TeamMbrService.TestConsole.exe\"" "-filter:+[Archer.TCM.IntegrationServices]* +[Archer.TCM.IMNService]* +[Archer.TCM.POSService]* +[Archer.TCM.Logger]* +[Archer.TCM.TeamMbrService]* +[Archer.TCM.CEDSService]* " -mergebyhash -output:C:\Apps\Sonar-DotNet\AP-Case- Management\Applications\Archer.TCM.IntegrationServices\.sonar\coverage-report.xml

after completion of execution, i ran the echo %errorlevel% command and the output is "0".

do let me know more details are required.