Ticket #5344 (closed: fixed)

Opened 8 years ago

Last modified 5 years ago

Add unit test for WorkspaceHistory::loadNexus and saveNexus()

Reported by: Janik Zikovsky Owned by: Keith Brown
Priority: critical Milestone: Release 3.0
Component: Framework Keywords: Maintenance
Cc: Blocked By:
Blocking: Tester: Russell Taylor

Description

These are probably tested within Load/SaveNexusProcessed. A class-level unit test would be nice.

Change History

comment:1 Changed 8 years ago by Nick Draper

  • Milestone changed from Release 2.2 to Release 2.3

Moved at the end of release 2.2

comment:2 Changed 8 years ago by Nick Draper

  • Milestone changed from Release 2.3 to Release 2.4

Moved to milestone 2.4

comment:3 Changed 8 years ago by Nick Draper

  • Milestone changed from Release 2.4 to Release 2.5

Moved at the code freeze for release 2.4

comment:4 Changed 7 years ago by Nick Draper

  • Milestone changed from Release 2.5 to Release 2.6

Moved to r2.6 at the end of r2.5

comment:5 Changed 7 years ago by Nick Draper

  • Component changed from Mantid to Framework

comment:6 Changed 7 years ago by Nick Draper

  • Priority changed from major to critical
  • Keywords Maintenance added

comment:7 Changed 7 years ago by Nick Draper

  • Owner changed from Anyone to Keith Brown

comment:8 Changed 7 years ago by Keith Brown

  • Milestone changed from Release 2.6 to Release 3.0

comment:9 Changed 7 years ago by Keith Brown

  • Status changed from new to inprogress

comment:10 Changed 7 years ago by Keith Brown

Test is saving a file

Test now saves a sample file, next thing to do is make sure the file is formatted right.

The load test hasn't had anything happen to it yet.

Refs #5344

Changeset: 24839f2da61649ac7ad8defece9b9611ad9f9158

Last edited 7 years ago by Keith Brown (previous) (diff)

comment:11 Changed 7 years ago by Keith Brown

test_LoadNexus() completed and test_SaveNexus() tidied

The unit test for WorkspaceHistory now tests that LoadNexus() loads everything properly, and SaveNexus() saves everything properly.

test_SaveNexus() has also been tided since last commit.

Refs #5344

Changeset: c652151da6a0890bac38cfeec82691fb067c9cf0

Last edited 7 years ago by Keith Brown (previous) (diff)

comment:12 Changed 7 years ago by Keith Brown

  • Status changed from inprogress to verify
  • Resolution set to fixed

comment:13 Changed 7 years ago by Keith Brown

  • Status changed from verify to reopened
  • Resolution fixed deleted

reopening, forgot to checkbuild

comment:14 Changed 7 years ago by Keith Brown

  • Status changed from reopened to inprogress

Fixed Gcc complier error

Gcc didn't like <::NeXus::File> as <: is apparently an equivelent to [ in that compiler, added whitespace to stop it.

Refs #5344

Changeset: 71ef3e1259b94267d0472a89cd75fd0d6a0c8cc3

comment:15 Changed 7 years ago by Keith Brown

  • Status changed from inprogress to verify
  • Resolution set to fixed

comment:16 Changed 7 years ago by Russell Taylor

  • Status changed from verify to verifying
  • Tester set to Russell Taylor

comment:17 Changed 7 years ago by Russell Taylor

  • Status changed from verifying to reopened
  • Resolution fixed deleted

It's OK as far as it goes, but I'd like to see some testing for failure as well as success - e.g. test saving/loading an empty history, test that nothing catastrophic happens if the history field in a file is corrupt/invalid/missing.

comment:18 Changed 7 years ago by Keith Brown

  • Status changed from reopened to inprogress

Adding failiue tests for both save and load

Currently in the process of adding tests that look at data that is formatted incorrectly

Refs #5344

Changeset: 9ef14badbf10216b09dc12a7ca396eebd5d34da8

comment:19 Changed 7 years ago by Keith Brown

Finished Unit tests with failure tests

Added 7 more tests taht each check for a different kind of error.

Refactored using a function that changes for the test with a parameter.

Refs #5344

Changeset: 558c1c9bf2535f34e5bab088e523c36afebc190f

Last edited 7 years ago by Keith Brown (previous) (diff)

comment:20 Changed 7 years ago by Keith Brown

  • Status changed from inprogress to verify
  • Resolution set to fixed

comment:21 Changed 7 years ago by Russell Taylor

  • Status changed from verify to verifying

comment:22 Changed 7 years ago by Russell Taylor

  • Status changed from verifying to closed

Nice work.

comment:23 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 6190

Note: See TracTickets for help on using tickets.