# Best way to execute "tests" with Ansible and report meaning full error messages

**URL:** <https://forum.ansible.com/t/best-way-to-execute-tests-with-ansible-and-report-meaning-full-error-messages/22240>\
**Category:** Ansible Project\
**Created:** [August 9, 2016, 3:37am UTC](https://forum.ansible.com/t/best-way-to-execute-tests-with-ansible-and-report-meaning-full-error-messages/22240 "2016-08-09T03:37:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Damien\_Garros](https://avatars.discourse-cdn.com/v4/letter/d/73ab20/32.png) [@Damien\_Garros](https://forum.ansible.com/u/Damien_Garros)\
**Post date:** [August 9, 2016, 3:37am UTC](https://forum.ansible.com/t/best-way-to-execute-tests-with-ansible-and-report-meaning-full-error-messages/22240/1 "2016-08-09T03:37:38Z")

</div>

Hi

I’m trying to see if I can use Ansible to run some tests on network devices.  
My goal is to execute a lot of “tests”, similar to unit tests in software dev, and report what passed and what failed at the end.

Right now I’m facing 2 issues that are making it complicated and I would be interested to hear people’s feedback here to see if there is a better solution available.

> **1/ When a task fails, all remaining tests for this device are not executed.**  
> This is problematic because I would like to have all tests executed all the time and have a clear “report” of how many passed or failed.  
> Today I use “ignore\_errors: true” but it’s not ideal as if changes the summary.  
> Is there a way to execute all tasks, even after a failure and keep the summary consistent ?
> 
> **2/ When a task fails, the complete value returned is printed on screen without much formatting,**  
> If makes it difficult to understand why it fails in the first place and it can generate a lot of noise on the screen.  
> Is it possible to print only a portion of the value returned by a module on failure and access the remaining part as a variable.

Thanks  
Damien
