We describe an algorithm for computing automorphism groups and testing isomorphisms of finite dimensional Lie algebras over finite fields. The algorithm is particularly effective for simple or almost simple Lie algebras. We show how it can be used in a computer search for new small-dimensional simple Lie algebras over the field with two elements.