开发者

testing application server response [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
开发者_如何学Python

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Closed 7 years ago.

Improve this question

My application has a two completly seperated application servers. They speak with each others in various models for instance. A puts a file in a Folder B listen and reads the file, create a response FILE in a new Folder A picks up the "response" file.

Same thing with JMS: A publish something B will listen and Reply

Now, I want to test this with application A only so that I have some sort of dynamic stub simulating B that is triggered when my real application A is creating the file or the Topic.

Any framworks that can support this?

I saw Mactor, but it looks like a dead project, any other sugegstions?


You should be able to create a mock server for B based on the real code for B. I would use that to create your mock instance for testing purposes.


To solve this requirment, to perform relativly good level of integration testing with external system we have no control over. We used Jmeter. Jmeter has the capability to listen on a JMS resource, wait for a request and act upon it, we used a set of stubs to represents the logic of the real system that way.


I'm not sure why you need a framework for this. You need to be able to drive files and JMS from inside a JUnit (or whatever) test, but that is a simple matter of coding.

You can then write tests that do things like:

  1. Create a file in A's input directory
  2. Wait for a file to appear in A's output directory
  3. Validate the contents of the file

For more complicated series of interactions, simply extend the sequence with more action - wait - validation cycles.

Perhaps you are thinking that you need a framework that can react to different events coming from A, so that you don't need to write sequences of interactions out explicitly. I would say this is a bad idea. A test should be an explicit sequence, so it's clear what it's doing.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜