added autotest testing to test_ami