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 ...
5
votes
1answer
1k views

What Is the Best Way To Mock Browser Time and Time Zone in Selenium?

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 libfaketime/...
4
votes
2answers
954 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 ...
2
votes
1answer
121 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 ...
2
votes
0answers
346 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 ...
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
1k 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 ...
0
votes
1answer
67 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 daoInterface....
0
votes
1answer
141 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
488 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
0answers
7 views

JUnit + Mockito - getting sessionFactory while running appliacation but unable to get object for junit test cases

In my spring application there is one file called application-config.xml Which contains sessionFactory bean. Inside that hibernate configurations are specified. while running the application class ...
0
votes
0answers
10 views

load application-config.xml (spring+hibernate) file from test case

I am using application-config.xml file in which the hibernate configarations are included. When I run my test case (using Junit with Mockito), I want to call an abstract class HibernateUtil. Here it ...
0
votes
0answers
21 views

load testing tool ability to mock and monitor external dependencies

I have a system that is due to undergo load testing. Liaising with the load testing team has been difficult and less than helpful, but to cut a long story short they claim the load testing tool they ...
0
votes
1answer
40 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 ...