noob hoping for pointers

I’m a complete beginner, I want to do something very specific so I thought it would be worth posting in case anyone had pointers.

I want to add the following functionality to my website:
A bare bones cloud ide that runs an input snippet of code many times on a test file of inputs and checks the output each time.

I was thinking I might use codemirror as the tool for inputting the code snippet, I was wondering how best to handle compilation and running over the test file?

Thank you very much in advance!