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
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/...
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
345 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
0answers
5 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
19 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 ...