espflash icon indicating copy to clipboard operation
espflash copied to clipboard

Include more unit/integration tests where possible

Open jessebraham opened this issue 3 years ago • 2 comments
trafficstars

Certain modules can likely be tested quite thoroughly, so we should add more tests.

It would be nice to include more unit tests especially, though this may require refactoring. Some sort of end-to-end testing of the CLI subcommands would be interesting as well, though that is unexplored territory for me.

Resources:

  • https://rust-cli.github.io/book/tutorial/testing.html
  • https://rust-cli.github.io/book/resources/index.html

jessebraham avatar Apr 26 '22 11:04 jessebraham

  • Since being split out, esp-idf-part now has quite reasonable test coverage; in turn, our partition table handling does as well.
  • The image format tests have been updated for the IdfBootloader and Esp8266 image formats; there is still no test for the DirectBoot format.

jessebraham avatar Oct 24 '22 18:10 jessebraham

I'm going to call this "good enough" for the 2.0.x release, though I'll leave the issue open as we should still investigate improving the current situation.

jessebraham avatar Oct 24 '22 18:10 jessebraham

I'm not sure there's much more testing we can do without some major refactoring, and we have #439 open for some HIL-like testing, so gonna go ahead and close this.

jessebraham avatar Nov 06 '23 19:11 jessebraham