frondeus / frondeus/test-case

Accept external test suite files to generate test cases

Open
#89 9 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
633
Forks
42
PR merge metrics
No merged PRs in 30d

Description

I don't know if this matches the plan for the crate but I though it is suitable.

The QA in the project I work on have a `csv` file with test cases input/output:
```csv
scenario_name,assert_http_code,assert_error_message,name
May not have linebreaks,400,error message,\n
...
```

I wanted to use it to generate test cases in rust, I was thinking about something like:
```rust
#[test_input] // used to generate test names
struct TestInput {
scenario_name: String,
assert_http_code: u16,
assert_error_message: String,
name: String,
}

#[generate_test_suite_from_file("path_to_file.csv")] // parsed by https://crates.io/crates/csv
fn test_suite_name(input: TestInput) {
// ... test code
}
```
This would generate:
```rust
mod test_suite_name {
#[test]
fn may_not_have_linebreaks(input: TestInput) {
// ... test code
}
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.