From 87a588c5df025bd43469981e2cc8b409422ae609 Mon Sep 17 00:00:00 2001 From: Keith Butler <keith.butler@stfc.ac.uk> Date: Tue, 24 Jul 2018 14:36:36 +0100 Subject: [PATCH] Re #0 Splitting error and recovery tests --- .../ErrorReporterTesting.rst | 100 +++++++++++++++ ...ecovery.rst => ProjectRecoveryTesting.rst} | 121 +++--------------- dev-docs/source/Testing/index.rst | 3 +- 3 files changed, 118 insertions(+), 106 deletions(-) create mode 100644 dev-docs/source/Testing/ErrorReporter-ProjectRecovery/ErrorReporterTesting.rst rename dev-docs/source/Testing/ErrorReporter-ProjectRecovery/{ErrorAndRecovery.rst => ProjectRecoveryTesting.rst} (55%) diff --git a/dev-docs/source/Testing/ErrorReporter-ProjectRecovery/ErrorReporterTesting.rst b/dev-docs/source/Testing/ErrorReporter-ProjectRecovery/ErrorReporterTesting.rst new file mode 100644 index 00000000000..83b521cd329 --- /dev/null +++ b/dev-docs/source/Testing/ErrorReporter-ProjectRecovery/ErrorReporterTesting.rst @@ -0,0 +1,100 @@ +.. _error_reporter_testing: + +Error Reporter Testing +====================== + +.. contents:: + :local: + +Error Reporter test +------------------- + +*Preparation* + +- Ensure that `Report usage data` is checked in the First Time Setup screen +- Files ``SANS2D00005512.nxs`` +- Make sure the location of these files is included in your search + directories. Full instructions `are available + online <http://www.mantidproject.org/MBC_Getting_set_up#MantidPlot_First-Time_Setup>`__. +- These tests should be run with someone who has access to the error reports database. Please contact Keith Butler when you are going to run these tests. + +**Time required 10 - 20 minutes** + +-------------- + +1. Open MantidPlot + +- Cause a crash by running the `Segfault` algorithm +- The error report dialog should pop up +- Make sure the hyperlink to the privacy policy works +- Enter some text in the `Name` box; make sure the `Share non-identifiable information` button gets greyed out +- In the `Name` box enter `Private` and in the `Email` box enter `private` +- Click the `Don't share any information` box + +--------------- + +2. Open MantidPlot + +- Cause a crash by running the `Segfault` algorithm +- The error report dialog should pop up +- In the `Name` box enter `Public` and in the `Email` box enter `public` +- Click the `Yes, share information` box + +--------------- + +3. Open MantidPlot + +- Load the file `SANS2D00005512.nxs` +- Click on the new workspace group, this should give a list of workspaces +- Right-click one of the workspaces and select `Sample Logs` +- This should cause an error box saying Mantid has thrown an unexpected exception +- Make sure the hyperlink to the privacy policy works +- Enter some text in the `Name` box; make sure the `Share non-identifiable information` button gets greyed out +- In the `Name` box enter `Private2` and in the `Email` box enter `private2` +- Make sure the `Continue` radio button is checked +- Click the `Don't share any information` box +- You should be returned to the main Mantid window + +--------------- + +4. Open MantidPlot + +- Load the file `SANS2D00005512.nxs` +- Click on the new workspace group, this should give a list of workspaces +- Right-click one of the workspaces and select `Sample Logs` +- This should cause an error box saying Mantid has thrown an unexpected exception +- Make sure the `Continue` radio button is checked +- Click the `Share non-identifiable information` box +- You should be returned to the main Mantid window + +--------------- + +5. Open MantidPlot + +- Load the file `SANS2D00005512.nxs` +- Click on the new workspace group, this should give a list of workspaces +- Right-click one of the workspaces and select `Sample Logs` +- This should cause an error box saying Mantid has thrown an unexpected exception +- Make sure the hyperlink to the privacy policy works +- Enter some text in the `Name` box; make sure the `Share non-identifiable information` button gets greyed out +- In the `Name` box enter `Public2` and in the `Email` box enter `public2` +- Make sure the `Continue` radio button is checked +- Click the `Yes, share information` box +- You should be returned to the main Mantid window + +--------------- + +6. Open MantidPlot + +- Load the file `SANS2D00005512.nxs` +- Click on the new workspace group, this should give a list of workspaces +- Right-click one of the workspaces and select `Sample Logs` +- This should cause an error box saying Mantid has thrown an unexpected exception +- Make sure the hyperlink to the privacy policy works +- Enter some text in the `Name` box; make sure the `Share non-identifiable information` button gets greyed out +- In the `Name` box enter `Public3` and in the `Email` box enter `public3` +- Make sure the `Terminate` radio button is checked +- Click the `Yes, share information` box +- Mantid should shut down + +--------------- diff --git a/dev-docs/source/Testing/ErrorReporter-ProjectRecovery/ErrorAndRecovery.rst b/dev-docs/source/Testing/ErrorReporter-ProjectRecovery/ProjectRecoveryTesting.rst similarity index 55% rename from dev-docs/source/Testing/ErrorReporter-ProjectRecovery/ErrorAndRecovery.rst rename to dev-docs/source/Testing/ErrorReporter-ProjectRecovery/ProjectRecoveryTesting.rst index 7f60d08a6f7..6868de8397a 100644 --- a/dev-docs/source/Testing/ErrorReporter-ProjectRecovery/ErrorAndRecovery.rst +++ b/dev-docs/source/Testing/ErrorReporter-ProjectRecovery/ProjectRecoveryTesting.rst @@ -1,104 +1,11 @@ -.. _error_recovery_testing: +.. _project_recovery_testing: -Error Reporter and Project Recovery Testing -=========================================== +Project Recovery Testing +========================= .. contents:: :local: -Error Reporter test -------------------- - -*Preparation* - -- Ensure that `Report usage data` is checked in the First Time Setup screen -- Files ``SANS2D00005512.nxs`` -- Make sure the location of these files is included in your search - directories. Full instructions `are available - online <http://www.mantidproject.org/MBC_Getting_set_up#MantidPlot_First-Time_Setup>`__. -- These tests should be run with someone who has access to the error reports database. Please contact Keith Butler when you are going to run these tests. - -**Time required 10 - 20 minutes** - --------------- - -1. Open MantidPlot - -- Cause a crash by running the `Segfault` algorithm -- The error report dialog should pop up -- Make sure the hyperlink to the privacy policy works -- Enter some text in the `Name` box; make sure the `Share non-identifiable information` button gets greyed out -- In the `Name` box enter `Private` and in the `Email` box enter `private` -- Click the `Don't share any information` box - ---------------- - -2. Open MantidPlot - -- Cause a crash by running the `Segfault` algorithm -- The error report dialog should pop up -- In the `Name` box enter `Public` and in the `Email` box enter `public` -- Click the `Yes, share information` box - ---------------- - -3. Open MantidPlot - -- Load the file `SANS2D00005512.nxs` -- Click on the new workspace group, this should give a list of workspaces -- Right-click one of the workspaces and select `Sample Logs` -- This should cause an error box saying Mantid has thrown an unexpected exception -- Make sure the hyperlink to the privacy policy works -- Enter some text in the `Name` box; make sure the `Share non-identifiable information` button gets greyed out -- In the `Name` box enter `Private2` and in the `Email` box enter `private2` -- Make sure the `Continue` radio button is checked -- Click the `Don't share any information` box -- You should be returned to the main Mantid window - ---------------- - -4. Open MantidPlot - -- Load the file `SANS2D00005512.nxs` -- Click on the new workspace group, this should give a list of workspaces -- Right-click one of the workspaces and select `Sample Logs` -- This should cause an error box saying Mantid has thrown an unexpected exception -- Make sure the `Continue` radio button is checked -- Click the `Share non-identifiable information` box -- You should be returned to the main Mantid window - ---------------- - -5. Open MantidPlot - -- Load the file `SANS2D00005512.nxs` -- Click on the new workspace group, this should give a list of workspaces -- Right-click one of the workspaces and select `Sample Logs` -- This should cause an error box saying Mantid has thrown an unexpected exception -- Make sure the hyperlink to the privacy policy works -- Enter some text in the `Name` box; make sure the `Share non-identifiable information` button gets greyed out -- In the `Name` box enter `Public2` and in the `Email` box enter `public2` -- Make sure the `Continue` radio button is checked -- Click the `Yes, share information` box -- You should be returned to the main Mantid window - ---------------- - -6. Open MantidPlot - -- Load the file `SANS2D00005512.nxs` -- Click on the new workspace group, this should give a list of workspaces -- Right-click one of the workspaces and select `Sample Logs` -- This should cause an error box saying Mantid has thrown an unexpected exception -- Make sure the hyperlink to the privacy policy works -- Enter some text in the `Name` box; make sure the `Share non-identifiable information` button gets greyed out -- In the `Name` box enter `Public3` and in the `Email` box enter `public3` -- Make sure the `Terminate` radio button is checked -- Click the `Yes, share information` box -- Mantid should shut down - ---------------- - Project Recovery test --------------------- @@ -107,6 +14,8 @@ Project Recovery test - Before running these tests, set project recovery to run every 2 seconds. The instructions for this are on the `Project Recovery concepts page <http://docs.mantidproject.org/nightly/concepts/ProjectRecovery.html>`_. - Get the ISIS sample dataset from the `Downloads page <http://download.mantidproject.org/>`_. +- Put the data in a data directory, referred to as ``data_directory`` in the scripts below +- Set up a directory to store output for comparison, referred to as ``testing_directory`` below **Time required XX - YY minutes** @@ -129,9 +38,11 @@ Project Recovery test .. code-block:: python - Load(Filename='<path-to-data>/INTER00013464.nxs', OutputWorkspace='INTER1') - Load(Filename='<path-to-data>/INTER00013469.nxs', OutputWorkspace='INTER2') - Load(Filename='<path-to-data>/INTER00013469.nxs', OutputWorkspace='INTER3') + data_directory=<path-to-data> + testing_directory=<path-to-test> + Load(Filename=data_directory + '/INTER00013464.nxs', OutputWorkspace='INTER1') + Load(Filename=data_directory + '/INTER00013469.nxs', OutputWorkspace='INTER2') + Load(Filename=data_directory + '/INTER00013469.nxs', OutputWorkspace='INTER3') RenameWorkspace(InputWorkspace='INTER2', OutputWorkspace='Rename2') RenameWorkspace(InputWorkspace='INTER1', OutputWorkspace='Rename1') RenameWorkspace(InputWorkspace='INTER3', OutputWorkspace='Rename3') @@ -153,9 +64,9 @@ Project Recovery test GroupWorkspaces(InputWorkspaces='Rename3_fit_Workspace_1_Workspace,Rename1_fit_Workspace_1_Workspace', OutputWorkspace='Rename3_fit_Workspaces') RenameWorkspace(InputWorkspace='Rename3_fit_Workspace_1_Workspace', OutputWorkspace='Sequential5') RenameWorkspace(InputWorkspace='Rename1_fit_Workspace_1_Workspace', OutputWorkspace='Sequential6') - SaveCSV(InputWorkspace='Sequential4', Filename='Sequence4.csv') - SaveCSV(InputWorkspace='Sequential5', Filename='Sequence5.csv') - SaveCSV(InputWorkspace='Sequential6', Filename='Sequence6.csv') + SaveCSV(InputWorkspace='Sequential4', Filename=testing_directory + '/Sequence4.csv') + SaveCSV(InputWorkspace='Sequential5', Filename=testing_directory + '/Sequence5.csv') + SaveCSV(InputWorkspace='Sequential6', Filename=testing_directory + '/Sequence6.csv') - Wait a few seconds, then provoke a crash by running `Segfault` - Re-start MantidPlot @@ -166,9 +77,9 @@ Project Recovery test .. code-block:: python - SaveCSV(InputWorkspace='Sequential4', Filename='Sequence4r.csv') - SaveCSV(InputWorkspace='Sequential5', Filename='Sequence5r.csv') - SaveCSV(InputWorkspace='Sequential6', Filename='Sequence6r.csv') + SaveCSV(InputWorkspace='Sequential4', Filename=testing_directory + '/Sequence4.csv') + SaveCSV(InputWorkspace='Sequential5', Filename=testing_directory + '/Sequence5.csv') + SaveCSV(InputWorkspace='Sequential6', Filename=testing_directory + '/Sequence6.csv') - Compare the contents of the `SequenceX.csv` and `SequenceXr.csv` files, they should be the same diff --git a/dev-docs/source/Testing/index.rst b/dev-docs/source/Testing/index.rst index 637a2d424c5..798061fe887 100644 --- a/dev-docs/source/Testing/index.rst +++ b/dev-docs/source/Testing/index.rst @@ -21,5 +21,6 @@ creation is outlined in :ref:`issue_tracking`. :maxdepth: 1 MuonInterface/MuonTesting - ErrorReporter-ProjectRecovery/ErrorAndRecovery + ErrorReporter-ProjectRecovery/ErrorReporterTesting + ErrorReporter-ProjectRecovery/ProjectRecoveryTesting -- GitLab