The three `json.NewEncoder(file).Encode(...)` calls in `filtertestgen.go`, `historytestgen.go`, and `filtertestperf.go` discarded their return values, so encode failures left empty/truncated JSON files while the process exited 0. Now each call routes the error through `exit()`, matching the surrounding pattern used for `os.Create` failures.
This pull request introduces a new test suite in workload framework, for
transaction tracing.
**test generation**
`go run . tracegen --trace-tests trace-test.json http://host:8545`
and you can choose to store the trace result in a specific folder
`go run . tracegen --trace-tests trace-test.json --trace-output
./trace-result http://host:8545`
**test run**
`./workload test -run Trace/Transaction --trace-invalid ./trace-invalid
http://host:8545`
The mismatched trace result will be saved in the specific folder for
further investigation.