Best way to do unit testing

Certified Lead Developer

Hello,

 

Do we have any best practices documentation around unit testing or can any one explain the best way to do unit testing for appian objects.

 

Thanks,

Nitesh

  Discussion posts and replies are publicly visible

Parents
  • Atleast run all the happy scenarios
    Make sure there are no performance issues
    Recode any inefficient code (unecessary database calls, unused variables, merge similar code to a single sub-rule)
    Test every time you change something and make sure nothing breaks
    Spotted a bug? Fix it and run a test to make sure it doesn't happen again
    Pass proper arguments to your function and make the test expect the proper return value
    Pass a NULL object reference. Do something that generates exceptions
    If you have dependencies which are blocking you then modularize the code to remove them and test independently 
    Unit test according to the acceptance criteria before marking any story as 'Done'
Reply
  • Atleast run all the happy scenarios
    Make sure there are no performance issues
    Recode any inefficient code (unecessary database calls, unused variables, merge similar code to a single sub-rule)
    Test every time you change something and make sure nothing breaks
    Spotted a bug? Fix it and run a test to make sure it doesn't happen again
    Pass proper arguments to your function and make the test expect the proper return value
    Pass a NULL object reference. Do something that generates exceptions
    If you have dependencies which are blocking you then modularize the code to remove them and test independently 
    Unit test according to the acceptance criteria before marking any story as 'Done'
Children
No Data