Reduce the stack usage of the testing framework by dynamically allocating the memory used for the test.