Creating a Submission
We can combine what we know about about submissions, TestData
, and prompt!
to make a complete submission.
This snippet will make a new submission, ask the user for their name and ID, then wrap those into a TestData
object and attach it to the submission.
let sub = Submission::from_data(data! {
"name" => prompt!("Name: ", String),
"id" => prompt!("ID: ", String)
});