Test tasks fixes and improvements