Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Hot answers tagged

8

I would agree with Laurent, and we have faced a very similar situation. Our team tests the APIs for data transport and parsing. The developer unit/component level tests were all against mock objects and data stores. Unit tests are not always comprehensive so we built a 'fake server' to emulate various web services that we used for running additional ...


4

I've read "Foundations of Software Testing: ISTQB Certification" by Dorothy Graham et al. For each chapter of Syllabus it has sample example questions, together with correct answers and reference to the paragraph explaining why it is correct. On ISTQB site there is is also a free sample of exam questions and correct answers but without explanation why it is ...


4

Don't know how reliable they are, but some of my colleagues recommend this site which they used before the exam (and they did all pass). I haven't tried it myself though.


3

I think "acceptance tests" and "mocking services layers" don't go along. My feeling is that when you do acceptance/functional testing, then you run your whole system in a manner close to the way it will be used although you try to do it in a QA/preprod environment to be confident of the state of your system. If, for the reasons you mention, you can not do ...


2

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


2

I think the same scenario could happen even if class A uses class B but does not contain class B. One way to mitigate that risk is to write unit tests for class B that validate the assumptions embedded in your mock.


2

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" return 1 end builtin_type $argv # call original end This should work across a variety of environments, and not depend on where git is installed, nor ...


2

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 Java application except it wouldn't be during deploy. The underlying language of the application shouldn't make a difference. Should I deploy the API on to a ...


2

Some good practice paper you will find here on istqbexamcertification. Main thing is to concentrate on syllabus given by ISTQB. As per my experience only some time questions come from practice paper in real exam. Paper is always based in ISTQB syllabus. So read , understand and remember each and every line of it.


1

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 remove that from the path, or determine programmatically where it's located, and remove the path. And then you'd have to worry about it being installed in ...


1

Turns out this was a bug in TypeMock. It has been fixed in version 8.6.0.18.


1

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 to a single method" As for future-proofing, if you're trying to test A in isolation, you're verifying that A works with the contracts to B and C not changing. ...


1

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 maintenance or make a change without you knowing it. Also as a QA you want to do a negative case and you want the endpoint give you specific result that ...


1

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 wiremock) or any other service like there ones or you might install either SoapUI or Postman or Wiremock that you have already mentioned. When you use online ...


1

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, database or a coded representation of one. As long as the class you want to test does not use hard-coded values to connect, you should be able to do this. You ...


1

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 your mobile app to this server. Simplest way is to make it configurable in the app itself. Alternately you can point the production hostname to your test server. ...


1

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

I had used browsermob-proxy and its Python client successfully in one of my project by using rewrite url to load mocking content. browsermob-proxy is a proxy server for the browser to connect with during testing. Assume you are hosting a webserver with mock content on localhost:8899, below example will load the mock content whenever the browser try to load ...


1

In Selenium features the server and client are running in separate processes. Therefore when mocking time with a tool like Timecop, the browser controlled by Selenium will still see the unmocked system time. Simple case: Synchronizing the client’s time with the mocked server’s time = render "layouts/sinon" # the card attached partial Advanced case ...


1

Yes, you can verify daoInterface.insert is called with verify(daoInterface).insert(anyObject());, but you have to mock DaoInterface first with DaoInterface db = mock(DaoInterface.class);. verify(daoInterface).insert(entity); will fail all the time because entity object from verify's argument and entity inside serviceMessage() are different instance. Instead, ...


1

This is a lot of questions that you might consider splitting up, but here goes: Dependency issue - why is this a problem for unit-testing in Android? Really, this is as much of a problem for Android as it is for anything else. Depending on how you architect your application, isolating from dependencies can easy or hard. There's nothing in your getName ...


1

The first question I would ask myself if I were you: do I have to test how third-party application works (e.g. Does the set of answers lead to an expected data in a csv file?) or do I assume that third-party app works fine and I just need to test integration between my application and third-party (e.g. Is a new csv file added to a shared sftp location gets ...


1

Parth, You have a few options here. Given that your system sends data to the third party system, you either know the format or can get the format of the data to send from your programming team. You know the format of the data returned. This is enough to build a simple simulator that will generate dummy data in the appropriate format given the input. ...


1

Here's one that compares current project stats and user ratings ofJava mocking frameworks: https://codix.io/c/Java+Mocking+Frameworks


1

This overview seems to give a pretty recent overview of mocking frameworks: https://code.google.com/p/jmockit/wiki/MockingToolkitComparisonMatrix


1

I've found this site to be pretty good. My favorite though is the Skills NB site. You have to search for the course, but the tests are given in very well manner.


Only top voted, non community-wiki answers of a minimum length are eligible