Add duration calcul in tests