Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
I have to simulate external webservice, specially SOAP webservice, to run integration test in java.
Any suggestion?
There are two approaches to this:
Run your integrations tests against the real external webservice, or a test version of it.
Write your own test webservice that simulates the subset of the external service's behavior required for your integration tests.
Note that depending on the nature of the service you are trying to simulate, your test service could be pretty dumb; e.g. providing pre-computed / hard-wired responses to expected requests.
There is no magic here. Just common sense and hard work.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
I'm trying to connect a backend program that I wrote in java to frontend design that I made with "FIGMA". I pretty new in that, I was trying to read some information about it but didn't successes.
how could I make this connection. its kind of a form application that i want to link it to HTML design
There are several ways to connect backend and frontend, one way is to use REST protocol.
Your Backend can expose REST service (some library you can use are Spring MVC, Jersey, CXF, etc) then your Frontend can call the REST service.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
The specific problem encountered is mocking context, state stores, and window objects pass into the function process.
Looks like all the examples, e.g., here and here are unit tests at the stream level (e.g., mockStreams, or using EmbeddedKafkaCluster).
If you're looking to test a single processor implementation, and need to mock context, state stores, etc, I would just use whatever testing tools you ordinarily use to mock things (Mockito, CGLIB, etc).
Beyond the scope of your question, there is also the ProcessorTopologyTestDriver. Posting in case you missed it. Kafka Streams is getting new/improved testing functionality in an upcoming version.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I have to design an application which gets requests from multiple sources like Web service (can be SOAP or REST), online system, Message Queue or some batch job. Application needs to interface with 2 more applications for getting results. I understand that this can be done using microservices. This application needs to be built in Java. I am looking for some framework which can help me with accepting input from multiple sources as mentioned above.
If you want to build a lightweight simple layer (single app) to cater all these requirements, I would recommend using Apache Camel. This single app can listen to rest/soap requests, read from file system, JMS store, database etc. You can even embed it into another application and have all sorts of integration with different data source and excellent and easy to configure routing and transformation engine. Plus the documentation and community is awesome.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I have implemented a QuickFIX/J application (the J stands for Java). Now I consider how to set up fixed test cases.
I am a little bit familiar with JUnit but I don't know if it's the right one for that issue, because QuickFIX/J has callbacks (fromApp-method of the Application class for example).
Maybe there is someone out there who has had the same problem and found a nice solution for that issue. ;)
I have used JUnit with QuickFIX/J tests. For call backs you can use a BlockingQueue<Message> so you can check in your main thread that you get the messages you expect. Or you can use a BlockingQueue of a data type of your choice.
If you're testing the responses of a QuickFix application, then you're really into integration testing rather than unit testing.
So as you've already written one QuickfixJ application, you could write a testing application that connects to it. So if your application is a Fix acceptor, write one that is an initiator.
Now you can send messages from your test application to your real application. Any responses from your real application will call onMessage() in your test application.
You can capture these callbacks and then you can verify that they match certain patterns (e.g., the application returns the same Client order id that the test sent). You can certainly use JUnit for this.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
Actually, i'm trying to run the same java selenium automation framework in multiple systems using their IP address. Is this possible in threads using different instances ?
How? is this possible ?
This will be possible suppose the automation is written as a test script then selenium instances will be called from python or java. Then you may implement the threading from the test script. This will lead to the script opening a lot of browsers at the same time, then it will need to be executed on a powerful computer, with sufficient amount of CPU load and RAM to support such numbers of browsers.
This is not an usual practice since the idea of using selenium should be to perform black-box and functional testing. While something that needs threading sounds more like a performance or stress test, which should be done with unit testing codes, e.g. JUnit