新規トピックを開始

Need a method of writing unit tests for actions

This may be similar to an earlier request but need a way to have tests that test all 


It is not possible to write a unit test for an action, that passes.  A unit test must test both passes and failures of the object being tested, in this case actions. Currently it is impossible.




ADMIN

Hi Hiroaki,


Can we please have a meeting so you can show us the use case and we can discuss in details?


Thanks,

Van.

Hi Van,


I would like to have a meeting to discuss this. I could meet tomorrow around 3-4 or Wed before 11.


Thanks,

Brad

ADMIN

Hi Brad, 


3pm today works for me. I will send out the meeting invite.


Thanks,

Van.

Van,


We write our own unit tests for all HLAs. Curious to know what process you are coming up with.


Thanks

Sathish

ADMIN

Sathish,


Hope you are doing great!

The best process will be vary from project to project, since it depends on many project-specific factors, rules, and restrictions. In general, our recommendation is:


1. Create a folder under Tests called Unit tests and two sub folders, one for Actions, one for Interfaces

2. Pick complex HLAs and create Test Modules for them. The more generic HLAs, the more test scenarios  needed to create for the actions.For example, HLA has control flows <if> <else if>, loops, all conditions of control flow, conditions of continue loop, break loop, etc.. should have test cases for. If the HLA tests a table, i.e., verify if a table is sorted in alphabetical order, we should have test cases for empty table, 1 column, many columns, table in sorted order already to see if the verification action mess up the table... The unit test should test all variations, situations that the HLAs can apply for

3. In the same way, we will create unit test for main interface entities

4. Put generous time in defining scope of unit tests, which HLAs, interfaces entities are core ones to be covered in unit tests, to avoid overlapping with regular tests 


Hope it help.

Van.

Thanks Van! I like the overall guideline. In our project we have a folder for all our unit tests for HLAs.


Are you adding anything to TA related to this request?

Hi Van,


It is still not possible to test the failure path of an action without the unit test itself appearing to fail (or is there a new way to do this)?


Brad

ADMIN

Hi Sathish, 


Glad to hear you are using the same process. Please let us know what feature would help you do your unit testing better. We will convey to the Product team to add to the product.


Hi Brad,


A failure case of an action can be marked as a known bug (a new feature of TA 8) so the test result will not show this expected failure. Please let us know if any assistance regarding using this feature, we are happy to help.


Regards,

Van.



ログイン 又は 登録 コメント投稿のため