Skip to content

Latest commit

 

History

History
22 lines (19 loc) · 864 Bytes

TESTING.md

File metadata and controls

22 lines (19 loc) · 864 Bytes

Testing Strategy and Standards

Our project follows the Test Driven Development approach. This means that all tests are written prior to the development of the working code. Our goal is to have a 90% or high code coverage whenever released to the Master branch.

Standards

  • Unit tests are located in local directory in the nested tests module

Example

#[cfg(test)]
mod tests {
   use super::*;

   #[test]
   fn test_myfunc_bad_result() {
       assert!(true);
   }
}
  • All tests should have names that describe what they are testing (e.g.: new_from_string_good_result)
  • Tests should include both the positive and negative scenarios
  • Test should cover exceptions and how they are handled
  • There should be tests that represent how the users will use the crate's functionalitiy