Mocking and faking are ways to isolate code or components to ensure that unit tests run against the testable unit of code only without actually utilizing other components or dependencies of an application. Mocking differs from faking in that a mock can be inspected to assert the results of a test.

learn more… | top users | synonyms

5
votes
3answers
2k views

To mock or not to mock with 'Automated Acceptance Tests'

I have been reading alot about automated acceptance testing. However, I have not found any information about how to manage external dependencies. Let's say you have a web application that acts like a ...
4
votes
2answers
851 views

Mocking IVR system

I am new to automation testing and was looking for guidance on how I can mock or create a simulator for a IVR ( automated call system ). We have an application, which sends some user data to a third ...
4
votes
1answer
956 views

Selenium - What Is The Best Way To Mock Browser Time and Time Zone?

I like to run Webdriver tests with altered time and time zone. I see two approaches ahead: 1.) Using a mocking library like SinonJS or TimeShift.js. 2.) Using system libraries like ...
2
votes
1answer
107 views

Android App api testing with mock

Currently, I ran into a situation where we are having constant Backend/API issues and because of the same, I can't continue with the testing. I was wondering if it is somehow possible to use a server ...
1
vote
1answer
46 views

How to avoid hidden bugs caused by test doubles?

I just got the Mockito framework for Java to try out mocking with JUnit. Trying it brought me to a basic question that I am sure is obvious but I have had trouble finding any answer for, probably ...
1
vote
2answers
839 views

Mocking HTTP reponses in Selenium Web Driver using Python

I am currently experimenting with the Python version of Selenium Web Driver. Using the driver has been straight forward so far but I have been struggling recently with the issue of mocking HTTP ...
1
vote
0answers
303 views

How to test an SDK built for Android?

My company has an SDK for the Android platform. The SDK sends information to our servers. I need to be able to intercept, interpret, and analyze what the SDK is sending to these servers in terms of ...
0
votes
1answer
64 views

Testing Verify Method Call Without Argument In Test Class

I have a class which takes a message with payload String. The payload is then split and used to create an Entity which is passed to DAOInterface to persist. How can you test the call ...
0
votes
1answer
140 views

Android / Java Unit-Testing Clarification

While looking up for unit testing for Android applications, I came across a lot of voices over how it is difficult to test-unit an Android app. For example: Dependency issue - why is this a problem ...
0
votes
1answer
453 views

Recent comparisons of Java mocking frameworks?

I'm trying to find recent comparisons of Java mocking frameworks but all of the ones I've seen are quite old. Can anyone point me to something relatively recent? Thanks
0
votes
1answer
38 views

Mocking for MXUnit

I'm fairly new to Coldfusion; at my new position, we're using MXUnit for unit testing our service library, but so far we're not mocking out the database (so we're testing against live data). I want to ...