You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@airavata.apache.org by Sachin Kariyattin <sa...@gmail.com> on 2018/02/28 01:09:32 UTC
Airavata unit tests - Mocking
Hello Dev,
I see that we don’t use mocking in any of the Airavata unit tests. This
sometimes makes it difficult because all the dependent objects need to be
created before one particular piece can be tested.
I came across this when I tried to test the validator class
(BatchQueueValidator, GroupResourceProfileValidator etc).
I am Planning to use JMockit http://jmockit.github.io and implement a unit
test to start with. Any feedback/views on this is appreciated.
--
*Regards,Sachin Kariyattin*
Re: Airavata unit tests - Mocking
Posted by Chathura Herath <ch...@gmail.com>.
I agree. I think this is the right approach to test multiple interface
abstracted framework like this. +1.
On Wed, Feb 28, 2018 at 8:32 AM Pierce, Marlon <ma...@iu.edu> wrote:
> +1, very good suggestion.
>
>
> Marlon
> ------------------------------
> *From:* Sachin Kariyattin <sa...@gmail.com>
> *Sent:* Tuesday, February 27, 2018 8:09 PM
> *To:* dev@airavata.apache.org
> *Subject:* Airavata unit tests - Mocking
>
> Hello Dev,
>
> I see that we don’t use mocking in any of the Airavata unit tests. This
> sometimes makes it difficult because all the dependent objects need to be
> created before one particular piece can be tested.
>
> I came across this when I tried to test the validator class
> (BatchQueueValidator, GroupResourceProfileValidator etc).
>
> I am Planning to use JMockit http://jmockit.github.io and implement a
> unit test to start with. Any feedback/views on this is appreciated.
>
>
> --
>
>
> *Regards, Sachin Kariyattin *
>
--
Chathura Herath Ph.D.
https://www.cs.indiana.edu/~cherath/
http://chathurah.blogspot.com/
Re: Airavata unit tests - Mocking
Posted by "Pierce, Marlon" <ma...@iu.edu>.
?+1, very good suggestion.
Marlon
________________________________
From: Sachin Kariyattin <sa...@gmail.com>
Sent: Tuesday, February 27, 2018 8:09 PM
To: dev@airavata.apache.org
Subject: Airavata unit tests - Mocking
Hello Dev,
I see that we don't use mocking in any of the Airavata unit tests. This sometimes makes it difficult because all the dependent objects need to be created before one particular piece can be tested.
I came across this when I tried to test the validator class (BatchQueueValidator, GroupResourceProfileValidator etc).
I am Planning to use JMockit http://jmockit.github.io and implement a unit test to start with. Any feedback/views on this is appreciated.
--
Regards,
Sachin Kariyattin
Re: Airavata unit tests - Mocking
Posted by Sachin Kariyattin <sa...@gmail.com>.
Hi Dimuthu,
Not sure about that. I had just used this before during my previous
internship. They do have frequent releases and active contributions going
on.
http://jmockit.github.io/changes.html
On Wed, Feb 28, 2018 at 2:20 PM, DImuthu Upeksha <dimuthu.upeksha2@gmail.com
> wrote:
> Hi Sachin,
>
> +1. mockito also is widely used in the industry. But when I went through
> some reviews, seems jmockit wins the competition. Do you have an idea about
> the maturity of the project?
>
> [1] http://site.mockito.org/
>
> On Wed, Feb 28, 2018 at 2:14 PM, Christie, Marcus Aaron <ma...@iu.edu>
> wrote:
>
>> +1.
>>
>>
>> On Feb 27, 2018, at 8:09 PM, Sachin Kariyattin <sa...@gmail.com>
>> wrote:
>>
>> Hello Dev,
>>
>> I see that we don’t use mocking in any of the Airavata unit tests. This
>> sometimes makes it difficult because all the dependent objects need to be
>> created before one particular piece can be tested.
>>
>> I came across this when I tried to test the validator class
>> (BatchQueueValidator, GroupResourceProfileValidator etc).
>>
>> I am Planning to use JMockit http://jmockit.github.io and implement a
>> unit test to start with. Any feedback/views on this is appreciated.
>>
>>
>> --
>>
>>
>> *Regards, Sachin Kariyattin *
>>
>>
>>
>
--
*Regards,Sachin Kariyattin*
Re: Airavata unit tests - Mocking
Posted by DImuthu Upeksha <di...@gmail.com>.
Hi Sachin,
+1. mockito also is widely used in the industry. But when I went through
some reviews, seems jmockit wins the competition. Do you have an idea about
the maturity of the project?
[1] http://site.mockito.org/
On Wed, Feb 28, 2018 at 2:14 PM, Christie, Marcus Aaron <ma...@iu.edu>
wrote:
> +1.
>
>
> On Feb 27, 2018, at 8:09 PM, Sachin Kariyattin <sa...@gmail.com>
> wrote:
>
> Hello Dev,
>
> I see that we don’t use mocking in any of the Airavata unit tests. This
> sometimes makes it difficult because all the dependent objects need to be
> created before one particular piece can be tested.
>
> I came across this when I tried to test the validator class
> (BatchQueueValidator, GroupResourceProfileValidator etc).
>
> I am Planning to use JMockit http://jmockit.github.io and implement a
> unit test to start with. Any feedback/views on this is appreciated.
>
>
> --
>
>
> *Regards, Sachin Kariyattin *
>
>
>
Re: Airavata unit tests - Mocking
Posted by "Christie, Marcus Aaron" <ma...@iu.edu>.
+1.
On Feb 27, 2018, at 8:09 PM, Sachin Kariyattin <sa...@gmail.com>> wrote:
Hello Dev,
I see that we don’t use mocking in any of the Airavata unit tests. This sometimes makes it difficult because all the dependent objects need to be created before one particular piece can be tested.
I came across this when I tried to test the validator class (BatchQueueValidator, GroupResourceProfileValidator etc).
I am Planning to use JMockit http://jmockit.github.io<http://jmockit.github.io/> and implement a unit test to start with. Any feedback/views on this is appreciated.
--
Regards,
Sachin Kariyattin