Hi Saneth,

Thanks for the clarifications. Will follow the guidelines you mentioned.

Thanks,
Supun

On Fri, Mar 20, 2015 at 7:01 PM, Saneth Dharmakeerthi <sane...@wso2.com>
wrote:

> Hi Supun,
>
> it is not a good idea to  populate a DB using  DB dumps, because it is not
> pactrical to maintain the db dumps and package the dumps with product.
>
> In user scenarios also  these workflows are executed in same oder it is ok
> to have dependencies among the workflows.
>
> But at the *beginning of each workflow it is must  to verify *the needed
> data is available in the db.
> These verifications can be implemented inside *@beforeClass *or *@
> beforeTest* methods(this depends on how you arrange the test cases).
> Also if  you arrange the each workflow as test groups you can use  "
> *dependsOnGroups*" to control the dependency amoung  workflows.
>
>
>
> Thanks and Best Regards,
>
> Saneth Dharmakeerthi
> Senior Software Engineer
> WSO2, Inc.
> Mobile: +94772325511
>
> On Fri, Mar 20, 2015 at 5:59 PM, Supun Sethunga <sup...@wso2.com> wrote:
>
>> Hi,
>>
>> While writing  Integration Automated Tests for Product ML, I came across
>> the following scenario:
>>
>> Suppose there are several workflows I want to test (workflow_1,
>>  workflow_2, ...). Each workflow consists of several methods.
>> i.e:
>>
>>    - workflow_1
>>       - method_A
>>       - method_B
>>       - method_C
>>    - workflow_2
>>       - method_X
>>       - method_Y
>>       - method_Z
>>    - and so on..
>>
>> Every workflow read/write from/to database. In user-scenarios, these
>> workflows are also again executed in order. i.e: each workflow needs the
>> data written to DB from the previous workflow.
>>
>> Would like to know the Best way of writing tests to this scenario. Is it
>> acceptable to use a happy-scenario of workflow_1 when initializing tests
>> for workflow_2?
>> OR should I populate the DB using a pre-created DB dump, OR mock the
>> database?
>>
>> Thanks,
>> Supun
>>
>> --
>> *Supun Sethunga*
>> Software Engineer
>> WSO2, Inc.
>> http://wso2.com/
>> lean | enterprise | middleware
>> Mobile : +94 716546324
>>
>
>


-- 
*Supun Sethunga*
Software Engineer
WSO2, Inc.
http://wso2.com/
lean | enterprise | middleware
Mobile : +94 716546324
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to