Thanks vijitha, This solves my requirement.

On Tue, Jan 9, 2018 at 11:55 AM, Vijitha Ekanayake <[email protected]>
wrote:

> Hi Milinda,
>
> AFAIK, there is no inbuilt capability to mocking such BEs within test
> framework itself. But you should be able to use HttpServer class to start a
> new server instance with a malformed payload within the test case itself.
>
> Can you try programmatically start simple HTTPServer within test case
> itself with malformed payload as done in[1]?
>
> [1]. https://github.com/wso2/product-ei/blob/master/
> integration/mediation-tests/tests-service/src/test/java/
> org/wso2/carbon/esb/rest/test/header/HTTPResponseCodeTestCase.java
>
>
> Thanks.
>
> On Tue, Jan 9, 2018 at 11:02 AM, Milinda Perera <[email protected]> wrote:
>
>> Hi,
>>
>> I'm writing a test case for product-ei, testing fault sequence execution
>> while building the message when BE returns malformed payload.
>>
>> I tried mocking BE with EI API but failed to return malformed payload.
>>
>> Do we have the ability to mock BE server within our test framework or EI
>> integration test common?
>>
>> Thanks,
>> Milinda
>>
>> --
>> Milinda Perera
>> Senior Software Engineer;
>> WSO2 Inc. http://wso2.com ,
>> Mobile: (+94) 714 115 032 <+94%2071%20411%205032>
>>
>>
>
>
> --
> Vijitha Ekanayake
> Senior Software Engineer*, *WSO2, Inc.; http://wso2.com/
> Mobile : +94 777 24 73 39 | +94 718 74 44 08
> lean.enterprise.middleware
>



-- 
Milinda Perera
Senior Software Engineer;
WSO2 Inc. http://wso2.com ,
Mobile: (+94) 714 115 032
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to