fix for Fatal error: Missing attribute value with karma karma ~0.12

if result.total is null, calculate the value based on success + failure + skipped.
You probably need another space between `){` here to conform with the surrounding code.