Skip to content

Commit e48a9ce

Browse files
authored
Merge pull request #19 from ISISComputingGroup/gui_testing_copyedit
copyedit gui->testing
2 parents b32683f + efd7f23 commit e48a9ce

13 files changed

+591
-444
lines changed

doc/Glossary.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ A method of changing the internal parameters of an emulator to mimic the behavio
3232

3333
Slits used on each of the Muon instruments to control the neutron flux to the sample. Each "jaw" pivots on one edge, much like a door on a hinge.
3434

35+
## BDD
36+
37+
Behaviour-driven development. See the [Agile Alliance definition of BDD](https://www.agilealliance.org/glossary/bdd/),
38+
and [how we use BDD for testing in Squish](/client/testing/System-Testing-with-Squish-BDD).
39+
3540
## Block
3641

3742
## Block Archive

doc/client/testing/Adding-Unit-Tests.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,35 @@
11
# Adding tests
22

3-
For more detailed information see [an_introduction_to_unit_testing.rst](An-Introduction-to-Unit-Testing).
3+
:::{seealso}
4+
- [Introduction to unit testing](An-Introduction-to-Unit-Testing)
5+
:::
46

5-
It is relatively simple to add unit tests for a plug-in in such a way that maven can run them as part of the build.
6-
7-
Here are the steps required in Eclipse:
7+
The steps required to add unit tests for a plugin are:
88

99
* Create a new Fragment Project
1010
* File > New > Project... > Plug-in Development > Fragment Project
11-
* Set the project name to `\<the full name of the plug-in to test\>.tests`
12-
* Change the location to the repository rather than the workspace: `xxx\ibex_gui\base\\\<project_name>` (don't forget the project name!!)
11+
* Set the project name to `<the full name of the plug-in to test\>.tests`
12+
* Change the location to the repository rather than the workspace: `ibex_gui\base\<project_name>` (don't
13+
forget the project name!)
1314
* Click "Next"
14-
* Make sure the Execution Environment points at the correct version of Java (currently JavaSE-11)
15+
* Make sure the Execution Environment points at the correct version of Java
1516
* Click the "Browse" button next to "Plug-in ID"
1617
* Select the plug-in to test and click "OK"
1718
* Finish
1819

19-
* In the newly created plug-in, add a new Package with the same name as the plug-in or something equally sensible.
20+
* In the newly created plug-in, add a new Package with the same name or structure as the plug-in.
2021
* Select the plug-in
2122
* File > New > Package
2223
* Enter the name and click "Finish"
2324

2425
* In the new Package create a class for adding test
2526
* Select the Package
2627
* File > New > Class
27-
* The class name **must** end in Test to be picked up by the automated build
28+
* The class name **must** end with `Test` to be picked up by the automated build
2829

2930
* Add tests to the class
30-
* Add `org.junit` and `org.mockito` (if required) to the 'Required Plug-ins', under the Dependencies tab for the manifest
31+
* Add `org.junit` and `org.mockito` (if required) to the 'Required Plug-ins', under the Dependencies tab for the
32+
manifest (`MANIFEST.MF`)
3133

3234
* Add the test plug-in to the Maven build by [following these steps](../coding/Adding-a-Plugin-or-Feature-to-Maven-Build)
3335

0 commit comments

Comments
 (0)