4
votes
Accepted
What should be unit tested in an API client?
Should and can I mix Fake and Mock by testing the payload generation part using a Fake and testing if correct endpoints are called by Mocking?
Yes, you can freely mix Fakes and Mocks. In fact, a ...
3
votes
Accepted
Best way to architect test development in Python so that tests can be run either with a mock or without a mock?
You can create have multiple implementations of your client object.
import abc
class MyServiceClient(abc.ABC):
@abc.abstractmethod
def get_item(self, id):
pass
class ...
3
votes
Accepted
Best strategy to test automatically a web application
There will always be some overlap in different tests, but if you look at the test pyramid the different layers have different goals.
The test pyramid is a way of thinking about different kinds of
...
3
votes
Accepted
Advice on API Mocking Tools
Depends on what your resources are you might want to use either online service like
either https://www.mocky.io/
or https://www.mockable.io/
or https://get.mocklab.io/ (that is build on top of ...
2
votes
Android App api testing with mock
It should be realtively easy to setup a server that behaves as your API, but always returns the same values so you can test against it.
You just need to make sure you can redirect the traffic from ...
2
votes
Accepted
How can I mock a c# restful webservice and test it using java?
How can I using java and something like rest-assured test this API? can I some how mock it to test or do I need to write my automation code in c# in order to do this?
The same way you would with a ...
2
votes
Advice on API Mocking Tools
Beeceptor.com, is very powerful tool and i believe it should suffice your need. You can easily do below:
Mock your responses
Introduce delay
Or even just use this as proxy to route your requests to ...
2
votes
Accepted
How to fake executable is missing?
Copying from the linked issue, you could override type to always return 1 when asked about git.
functions --copy type builtin_type
function type # mock
if test "x$argv" = "x-fq git"
...
2
votes
Accepted
Mock test automation with Wiremock + Xray + Jenkins possible?
TL;DR: Jenkins supports pipelines from code. Make your build, test and deploy pipeline in code and you are not dependent on a specific CD tool. If you can do it from the command line and with API's ...
2
votes
Where can I find ISTQB Foundation mock exams with reliable answers?
Quizzes for all the exam topics.
Cheat Sheet that covers all the topics.
Summary of the whole syllabus.
NOTE : You will have to login to access the quizzes
1
vote
Accepted
mocking tcp communication
When it comes to mocking TCP communication for integration and performance tests, there are a few options you can consider. One popular framework that can handle TCP mocking is Mountebank. Mountebank ...
1
vote
Cucumber + Junit + Extend Test Steps (use IDs in next step)
You can simply use a global variable. Save it in a base class that you inherit or you can import a helper class/file in your test.
// DataFile.java
class DataFile {
string myVar;
}
// Test1.java
...
1
vote
How to spoof a third party API
Can you set up env params and then use those to control which apis your app talks to? You could use that to easily set development, test and production api addresses.
1
vote
How to spoof a third party API
If you accept mocking with other packages than Postman, then I suggest using MockServer or WireMock, both having support for describing matching rules in Java and JSON.
For instance, with WireMock you ...
1
vote
How to spoof a third party API
According to Postman docs:
If there is no exact match found, Postman will return the best
matching response based on its algorithm.
I have tested the mock server and it does work with query ...
1
vote
How to spoof a third party API
We have a good experience with json-server. We found it really flexible.
Get a full fake REST API with zero coding in less than 30 seconds
(seriously)
Created with <3 for front-end developers who ...
1
vote
Is there any mocking framework available for blackbox testing of windows and mac apps?
You can use Charles Proxy's Re-Write Tool to create rules for capturing certain requests or responses and change on aspects of them.
1
vote
High-level help desired in forming a plan of attack for testing of background "cleanup" tasks
If I understand your question correctly you are looking for a way to test processes that check for an invalid db state(s) and fix them. What I can suggest is to make sure that the cron (or another ...
1
vote
How to properly test an indoor map, when you're not on the site itself?
You can try to use mock location indeed after you enabled them, have a lock here: https://www.xda-developers.com/fake-android-location/
Also won't be possible to download the map so that can be ...
1
vote
How to fake executable is missing?
You could update the $PATH so that git isn't in it, and then restore it afterwards.
However, this will be risky, as it means you'd either need to assume that git is installed somewhere, and just ...
1
vote
How to properly mock dependencies
While there's not a lot of details, the unittest.mock library should handle this for you? I think this is what you mean when you say "I know I can set a sequence of return values, but this is limited ...
1
vote
Advice on API Mocking Tools
Mocking some endpoint is a must when your application connect to other host which you can't manage all the time , (Eg. third party api to send sms or email)
Because sometimes the endpoint do a weekly ...
1
vote
How to test a class that wraps methods connect to a remote database
To test something like this you want your test to not care whether it's connecting to the actual remote database or to a mock database that you manage yourself. It can be an actual, if lightweight, ...
1
vote
Accepted
TypeMock trying to mock a random method?
Turns out this was a bug in TypeMock. It has been fixed in version 8.6.0.18.
1
vote
Android App api testing with mock
We used NodeJS to help as out of a similar situation. We designed a mock server on NodeJS and configured REST API to hit Node sever and fetch responses.
1
vote
Recent comparisons of Java mocking frameworks?
Here's one that compares current project stats and user ratings ofJava mocking frameworks:
https://codix.io/c/Java+Mocking+Frameworks
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
mock × 32automated-testing × 12
java × 6
python × 5
unit-tests × 5
test-design × 4
api-testing × 4
junit × 4
selenium-webdriver × 2
c# × 2
javascript × 2
android × 2
system-testing × 2
manual-testing × 1
selenium2 × 1
browser-automation × 1
test-automation-framework × 1
tools × 1
cucumber × 1
testcase × 1
performance-testing × 1
jenkins × 1
mobile × 1
robotframework × 1
rest-api × 1