We introduce an algorithm to decide isomorphism between tensors. The algorithm uses the Lie algebra of derivations of a tensor to compress the space in which the search takes place to a so-called densor space. To make the method practicable we give a polynomial-time algorithm to solve a generalization of module isomorphism for a common class of Lie modules. As a consequence, we show that isomorphism testing is in polynomial time for tensors whose derivation algebras are classical Lie algebras and whose densor spaces are 1-dimensional. The method has been implemented in the MAGMA computer algebra system. (C) 2022 Elsevier Inc. All rights reserved.