Unable to run pitest tool on java project using gradle-pitest-plugin in eclipse

1,702 views
Skip to first unread message

ipsri...@gmail.com

unread,
Jun 2, 2018, 10:23:10 AM6/2/18
to PIT Users
Hi ,

I am trying to run PIT mutation testing tool on a java project using gradle-pitest-plugin in eclipse.

I did the below configurations in build.gradle file

plugins {
    id 'info.solidsoft.pitest' version '1.3.0' 
} but getting error while running
gradlew build 
gradlew pitest command

Could you please help me with the configurations I need to put in build.gradle file to add pitest plugin  and how to run pitest task from gradle to get mutation coverage for the same.

If anyone could help me with a sample build.gradle file with the necessary configurations for pitest plugin ,it will be really helpful

ipsri...@gmail.com

unread,
Jun 3, 2018, 10:23:31 AM6/3/18
to PIT Users
Hi Marcin,

If you could please help me on the below configurations,it would be really awesome.


----------------------------

Marcin Zajączkowski

unread,
Jun 3, 2018, 3:56:05 PM6/3/18
to PIT Users
On 2018-06-02 16:23, ipsri...@gmail.com wrote:
> Hi ,
>
> I am trying to run PIT mutation testing tool on a java project using
> gradle-pitest-plugin in eclipse.
>
> I did the below configurations in build.gradle file
>
> plugins {
> id 'info.solidsoft.pitest' version '1.3.0'
>
> } but getting error while running

Hi ipsritz2015,

What errors? Please paste them (gist or some other pastebin-like
solution can be useful for longer output).

> gradlew build
> gradlew pitest command

Are you able to execute those commands from the console (without Eclipse)?

Can you provide a link to your project?

Marcin




>
> Could you please help me with the configurations I need to put in
> build.gradle file to add pitest plugin and how to run pitest task from
> gradle to get mutation coverage for the same.
>
> If anyone could help me with a sample build.gradle file with the necessary
> configurations for pitest plugin ,it will be really helpful
>

--
https://blog.solidsoft.info/ - Working code is not enough

ipsri...@gmail.com

unread,
Jun 5, 2018, 2:51:26 AM6/5/18
to PIT Users
Hi Marcin

As I am working on a secured project so I won't be able to share code Base but the error I am getting consistently in the build gradle file.

I have been able to download gradle-pitest-plugin jar 1.3.0 from nexus repository.
But after that I am getting errors in below lines in build gradle file
1)apply plugin:pitest
Getting error as Plugin with id pitest not found
Tried with apply plugin:info.solidsoft.pitest but getting same error.
Thus the pitest task as below
pitest{
targetClasses=[Base package]
}
not getting identified.
Using only pitest task above shows error
Could not find method pitest <> for arguments on root project

Please help here with the settings as I tried with all possible solutions provided in Internet over these issues and none is working.

Will be waiting for your early response
Thanks

Marcin Zajączkowski

unread,
Jun 5, 2018, 6:13:40 PM6/5/18
to pitu...@googlegroups.com
On 2018-06-05 08:51, ipsri...@gmail.com wrote:
> Hi Marcin
>
> As I am working on a secured project so I won't be able to share code Base but the error I am getting consistently in the build gradle file.
>
> I have been able to download gradle-pitest-plugin jar 1.3.0 from nexus repository.
> But after that I am getting errors in below lines in build gradle file
> 1)apply plugin:pitest

Why not:
apply plugin: 'info.solidsoft.pitest'
?

> Getting error as Plugin with id pitest not found

Please paste the related parts from build.gradle (especially buildscript
section and pitest configuration).

> Tried with apply plugin:info.solidsoft.pitest but getting same error.

Do you have '' in your build.gradle?

Marcin


> Thus the pitest task as below
> pitest{
> targetClasses=[Base package]
> }
> not getting identified.
> Using only pitest task above shows error
> Could not find method pitest <> for arguments on root project
>
> Please help here with the settings as I tried with all possible solutions provided in Internet over these issues and none is working.
>
> Will be waiting for your early response
> Thanks
>


Reply all
Reply to author
Forward
0 new messages