No, there still isn't any common practice for this since this is not very common.
I would recommend you to create a Development Jenkins Environment and run tests against it. Right now you will have to do that from scratch since there are not many open source repositories that could help you.
So, how does this Jenkins Development Environment look like?
No, Jenkins file is not created at execution.
Actually Jenkins file is a suite of all steps or activity which you want to build as a job or a groovy code.
Jenkins file come from code repository, if you added file in your project.
Below is a Jenkins file example: