Which mocking framework do you use.

123 views
Skip to first unread message

Harry van Oosten

unread,
Jan 17, 2014, 9:01:43 AM1/17/14
to adf-met...@googlegroups.com
Hello, 

We building some programmatic business components. We want to unit test these but without the services behind them. 

Does anyone have a good idea which mocking framework will be suited. 

Jmock, Jmockit, Powermock, EasyMock, Mockito, .. ?

Kind regards,

Harry van Oosten
Wilfred van der Deijl

Vishal Sanganaboina

unread,
Jan 21, 2014, 2:00:30 PM1/21/14
to adf-met...@googlegroups.com
We use  Powemockito, works well.


--
--
You received this message because you are subscribed to the ADF Enterprise Methodology Group (http://groups.google.com/group/adf-methodology). To unsubscribe send email to adf-methodolo...@googlegroups.com
 
All content to the ADF EMG lies under the Creative Commons Attribution 3.0 Unported License (http://creativecommons.org/licenses/by/3.0/). Any content sourced must be attributed back to the ADF EMG with a link to the Google Group (http://groups.google.com/group/adf-methodology).
 
---
You received this message because you are subscribed to the Google Groups "ADF Enterprise Methodology Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adf-methodolo...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
cheers,
Vishal

John Flack

unread,
Jan 22, 2014, 7:54:59 AM1/22/14
to adf-met...@googlegroups.com
Okay, but please elaborate - Why did you choose this?  How are you using it?  What do you like about it?  What do you dislike?  Who would you recommend this for?

Florin Marcus

unread,
Jan 22, 2014, 9:45:30 AM1/22/14
to adf-met...@googlegroups.com
Harry, Vishal,
Same as John, I am very curious about how are you practically mocking up EO's, VO's or AM's, whatever Mocking  framework.


I must say I've never used mocking in relation with ADF technology, but sometimes we've needed STUBS  to simulate a web service call, or a database package that wasn't created yet.  But this is rather related to ADF integration with other technologies, then with ADF components directly. 

I look forward to see a decent size ADF application written in Test Driven Development style, with JUnit tests over  BC and developers writing-tests-first, before writing business logic. Not sure I will any time soon, since ADF Model layer is not Test-Driven-Development friendly I would dare saying. With such tight integration between ADF Faces and ADF BC, JUnit tests bring rather limited gain, since ADF Faces can control ( and change) the VO's queries or fetching behaviour. In order words, you can't really test your Business Logic in isolation, since you can't truly control the set of operations you expose to View Layer.  Though, you can test SOME of the functionality like complex db functions or queries. 

This is why we moved away from Unit Testing  towards Automated Acceptance Testing, using Selenium and JUnit, where we test the whole functionality exposed in browser, rather than isolating modules.

Thanks,
Florin







 


 
 

Vishal Sanganaboina

unread,
Jan 22, 2014, 3:07:51 PM1/22/14
to adf-met...@googlegroups.com
y did you choose this? This was already in our product, so I thought of giving it a try.
 How are you using it? Our backend(model) is mbean so its easy to mock them all.
 What do you like about it?  Mocking. 
 What do you dislike?  Sometimes its very difficult to mock some classes, then I had to put some wrapper around the object.
Who would you recommend this for? If your classes are mockable then go-ahead or else dont.
Reply all
Reply to author
Forward
0 new messages