Adding key-generation to autotest