I'm working on a project that has me responsible for testing out some software that scrapes a web-page representing an input form, and generates a mobile friendly version of that page. This is particularly useful for form data, since not all websites have mobile-enabled browsers, and the aim of this project is to ultimately take these mobile-unfriendly pages, do some parsing on them, and then create a mobile-friendly version of said web-pages.
The code responsible for generating these mobile-friendly documents is more or less in javascript, which is the most untested portion of our code base. I want to find a way to test this code, and an idea came up amongst the team to see if there is some way to "record" a user's interaction with a web-site to disk such that locally, on the file system, there will be a series of N web-pages, each linking to one another on the file system. This way, we can generate test data rather easily for our project. There are several types of forms that we have to handle, such as forms that span across different web-pages, forms that have some javascript to hide aways certain fields, etc...
I'm not at all a web-developer; I'm more of a backend engineer. I think the greater goal we have is to find a way to test javascript that depends on the existence of specific types of forms; this latest requirement I have sort of grew out of that. Getting to the point, I have a couple of questions:
1) Is the creation and maintenance of this tool even a good idea? It would help create test data trivially assuming this was a browser plugin, but something about it seems kinda off to me.
2) What is the best way to do what I need to do, which is to find a way to test out some parser-javascript?