0xMiden / 0xMiden/rust-sdk

Improvements to integration tests binary

未關閉
#1,740 5 則留言 0 個 reaction 已指派 1 人 已被 @SantiagoPittella 認領 在 GitHub 檢視
question tests
主要語言
Rust
星號
78
分支
129
平均合併
4 天 14 小時
30 天內合併 PR
52

描述

Currently, the integration tests binary contains various features, but we can improve it with some other things. Writing them down here to have a list in the backlog, but it might be worth opening new issues for some of these:

- Emit traces, or at least more structured output. Currently, as a consequence of most tests just being taken as-is from the crates tests modules, the logging/info output is all over the place. We can improve this a bunch by emitting traces, or at least emitting more information (for example, we should output transaction IDs, executing account IDs, note IDs, etc. so that test failures/successes are easier to track down). We can have various levels of verbosity that can be configured through the CLI
- We should add a retry mechanism. I'd prefer the simplest approach to this: compile any tests that failed into a list which gets retried after all tests are done. The reasoning for this is that sometimes, because a lot of tests are executed at the same time and they are resource intensive, scheduling is not very tight and some tests do still rely on timing/block producing so retrying them when there is less pressure seems like a good approach
- Would be nice to still be able to run these against a mockchain. The reason for this is to just have a way of knowing that the `MockChain` is still a (mostly, at least) valid way of testing. The problem here is that a mockchain requires explicit block production calls, but maybe we can create a service that creates a block every couple seconds or so
- We need to find a way to integrate the CLI integration tests _and_ the WebClient tests to this, and consider all the improvements above for these tests as well (currently they are very much just test code). Optionally, maybe could be cool (up for discussion) to integrate `miden-tutorials`, but this might be overkill and out of scope. WebClient tests will not be easily integrated AFAICT, not unless we can rely on the user having `yarn` which may be fine (I made a draft of this and it seemed to work)

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。