Electronic tension and compression testing machine