New characterization of Sobolev metric spaces