From ab22918ab8fc67d30dad1fb1ae0f37e51f49df95 Mon Sep 17 00:00:00 2001 From: tcofoegbu Date: Tue, 7 Jul 2015 15:40:54 +0100 Subject: [PATCH] JAL-1805 test envirionment separation --- src/jalview/gui/AnnotationPanel.java | 2 +- src/jalview/jbgui/GAlignFrame.java | 18 +++--- src/jalview/renderer/AnnotationRenderer.java | 2 +- test/MCview/AtomTest.java | 6 +- test/MCview/BondTest.java | 2 +- test/MCview/PDBChainTest.java | 24 +++---- test/MCview/PDBfileTest.java | 15 +++-- test/MCview/ResidueTest.java | 2 +- test/com/stevesoft/pat/RegexWriterTest.java | 67 +++++++++++++------ test/jalview/analysis/AAFrequencyTest.java | 8 +-- test/jalview/analysis/AlignSeqTest.java | 4 +- .../analysis/AlignmentAnnotationUtilsTest.java | 10 +-- test/jalview/analysis/AlignmentUtilsTests.java | 40 ++++++------ test/jalview/analysis/AnnotationSorterTest.java | 16 ++--- test/jalview/analysis/CodingUtilsTest.java | 6 +- test/jalview/analysis/CrossRefTest.java | 2 +- test/jalview/analysis/DnaTest.java | 18 +++--- test/jalview/analysis/GroupingTest.java | 2 +- test/jalview/analysis/ParsePropertiesTest.java | 6 +- test/jalview/analysis/RnaTest.java | 6 +- test/jalview/analysis/TestAlignSeq.java | 6 +- .../scoremodels/FeatureScoreModelTest.java | 2 +- test/jalview/bin/CommandLineOperations.java | 3 +- test/jalview/commands/EditCommandTest.java | 41 ++++++------ test/jalview/datamodel/AlignedCodonFrameTest.java | 6 +- .../datamodel/AlignedCodonIteratorTest.java | 8 +-- test/jalview/datamodel/AlignedCodonTest.java | 4 +- .../datamodel/AlignmentAnnotationTests.java | 6 +- test/jalview/datamodel/AlignmentTest.java | 14 ++-- test/jalview/datamodel/ColumnSelectionTest.java | 6 +- test/jalview/datamodel/DBRefEntryTest.java | 2 +- test/jalview/datamodel/MappingTest.java | 2 +- test/jalview/datamodel/PDBEntryTest.java | 2 +- test/jalview/datamodel/SearchResultsTest.java | 2 +- test/jalview/datamodel/SeqCigarTest.java | 2 +- test/jalview/datamodel/SequenceDummyTest.java | 14 ++-- test/jalview/datamodel/SequenceTest.java | 34 +++++----- test/jalview/datamodel/xdb/embl/EmblFileTest.java | 2 +- test/jalview/ext/jmol/PDBFileWithJmolTest.java | 4 +- test/jalview/ext/paradise/TestAnnotate3D.java | 12 ++-- .../ext/rbvi/chimera/ChimeraCommandsTest.java | 4 +- test/jalview/ext/rbvi/chimera/ChimeraConnect.java | 2 +- .../ext/rbvi/chimera/JalviewChimeraView.java | 4 +- test/jalview/gui/AlignViewportTest.java | 2 +- test/jalview/gui/AnnotationChooserTest.java | 34 +++++----- test/jalview/gui/FontChooserTest.java | 2 +- test/jalview/gui/HelpTest.java | 2 +- test/jalview/gui/JAL1353bugdemo.java | 3 +- test/jalview/gui/JvSwingUtilsTest.java | 4 +- test/jalview/gui/PDBSearchPanelTest.java | 9 +-- test/jalview/gui/PaintRefresherTest.java | 6 +- test/jalview/gui/PopupMenuTest.java | 18 +++--- test/jalview/gui/ProgressBarTest.java | 6 +- test/jalview/gui/SequenceRendererTest.java | 2 +- test/jalview/gui/StructureChooserTest.java | 6 +- test/jalview/io/AnnotatedPDBFileInputTest.java | 10 +-- test/jalview/io/AnnotationFileIOTest.java | 4 +- test/jalview/io/BioJsHTMLOutputTest.java | 10 +-- test/jalview/io/FileIOTester.java | 12 ++-- test/jalview/io/Gff3tests.java | 68 +++++++++++--------- test/jalview/io/HtmlFileTest.java | 3 +- test/jalview/io/JSONFileTest.java | 16 ++--- test/jalview/io/Jalview2xmlTests.java | 12 ++-- test/jalview/io/NewickFileTests.java | 2 +- test/jalview/io/PhylipFileTests.java | 8 +-- test/jalview/io/RNAMLfileTest.java | 2 +- test/jalview/io/StockholmFileTest.java | 6 +- test/jalview/io/TCoffeeScoreFileTest.java | 16 ++--- test/jalview/schemes/DnaCodonTests.java | 8 +-- test/jalview/schemes/ResiduePropertiesTest.java | 8 +-- test/jalview/schemes/ScoreMatrixPrinter.java | 4 +- test/jalview/structure/Mapping.java | 10 +-- .../structure/StructureSelectionManagerTest.java | 8 +-- .../models/AAStructureBindingModelTest.java | 4 +- test/jalview/util/ColorUtilsTest.java | 6 +- test/jalview/util/ComparisonTest.java | 6 +- test/jalview/util/DBRefUtilsTest.java | 14 ++-- test/jalview/util/MapListTest.java | 20 +++--- test/jalview/util/MappingUtilsTest.java | 20 +++--- test/jalview/util/QuickSortTest.java | 13 ++-- test/jalview/util/ShiftListTest.java | 2 +- test/jalview/util/StringUtilsTest.java | 10 +-- test/jalview/viewmodel/styles/ViewStyleTest.java | 4 +- test/jalview/ws/PDBSequenceFetcherTest.java | 3 +- test/jalview/ws/dbsources/PDBRestClientTest.java | 19 ++++-- test/jalview/ws/dbsources/UniprotTest.java | 4 +- test/jalview/ws/gui/Jws2ParamView.java | 3 +- .../ws/jabaws/DisorderAnnotExportImport.java | 2 +- test/jalview/ws/jabaws/JalviewJabawsTestUtils.java | 3 +- .../ws/jabaws/JpredJabaStructExportImport.java | 17 ++--- test/jalview/ws/jabaws/MinJabawsClientTests.java | 3 +- test/jalview/ws/jabaws/RNAStructExportImport.java | 6 +- test/jalview/ws/jws2/ParameterUtilsTest.java | 6 +- test/jalview/ws/rest/RestClientTest.java | 2 +- test/jalview/ws/rest/ShmmrRSBSService.java | 4 +- test/jalview/ws/seqfetcher/DasSequenceFetcher.java | 2 +- test/jalview/ws/seqfetcher/DbRefFetcherTest.java | 8 ++- 97 files changed, 487 insertions(+), 433 deletions(-) diff --git a/src/jalview/gui/AnnotationPanel.java b/src/jalview/gui/AnnotationPanel.java index c952c13..97752f2 100755 --- a/src/jalview/gui/AnnotationPanel.java +++ b/src/jalview/gui/AnnotationPanel.java @@ -139,7 +139,7 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI, public AnnotationPanel(AlignmentPanel ap) { - MAC = new jalview.util.Platform().isAMac(); + MAC = jalview.util.Platform.isAMac(); ToolTipManager.sharedInstance().registerComponent(this); ToolTipManager.sharedInstance().setInitialDelay(0); diff --git a/src/jalview/jbgui/GAlignFrame.java b/src/jalview/jbgui/GAlignFrame.java index befa3b1..c6a042b 100755 --- a/src/jalview/jbgui/GAlignFrame.java +++ b/src/jalview/jbgui/GAlignFrame.java @@ -20,6 +20,14 @@ */ package jalview.jbgui; +import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder; +import jalview.api.SplitContainerI; +import jalview.bin.Cache; +import jalview.gui.JvSwingUtils; +import jalview.gui.Preferences; +import jalview.schemes.ColourSchemeProperty; +import jalview.util.MessageManager; + import java.awt.BorderLayout; import java.awt.Color; import java.awt.GridLayout; @@ -52,14 +60,6 @@ import javax.swing.event.ChangeEvent; import javax.swing.event.MenuEvent; import javax.swing.event.MenuListener; -import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder; -import jalview.api.SplitContainerI; -import jalview.bin.Cache; -import jalview.gui.JvSwingUtils; -import jalview.gui.Preferences; -import jalview.schemes.ColourSchemeProperty; -import jalview.util.MessageManager; - public class GAlignFrame extends JInternalFrame { protected JMenuBar alignFrameMenuBar = new JMenuBar(); @@ -262,7 +262,7 @@ public class GAlignFrame extends JInternalFrame System.err.println(e.toString()); } - if (!new jalview.util.Platform().isAMac()) + if (!jalview.util.Platform.isAMac()) { closeMenuItem.setMnemonic('C'); outputTextboxMenu.setMnemonic('T'); diff --git a/src/jalview/renderer/AnnotationRenderer.java b/src/jalview/renderer/AnnotationRenderer.java index 2ba7aff..3359678 100644 --- a/src/jalview/renderer/AnnotationRenderer.java +++ b/src/jalview/renderer/AnnotationRenderer.java @@ -132,7 +132,7 @@ public class AnnotationRenderer private FontMetrics fm; - private final boolean MAC = new jalview.util.Platform().isAMac(); + private final boolean MAC = jalview.util.Platform.isAMac(); boolean av_renderHistogram = true, av_renderProfile = true, av_normaliseProfile = false; diff --git a/test/MCview/AtomTest.java b/test/MCview/AtomTest.java index 186ac03..2e6551c 100644 --- a/test/MCview/AtomTest.java +++ b/test/MCview/AtomTest.java @@ -12,7 +12,7 @@ public class AtomTest * Test the constructor that parses a PDB file format ATOM line. Fields are in * fixed column positions */ - @Test + @Test(groups ={ "Functional" }) public void testStringConstructor() { Atom a = new Atom( @@ -35,7 +35,7 @@ public class AtomTest * Test the case where occupancy and temp factor are blank - should default to * 1 */ - @Test + @Test(groups ={ "Functional" }) public void testStringConstructor_blankOccupancyTempFactor() { Atom a = new Atom( @@ -47,7 +47,7 @@ public class AtomTest /** * Parsing non-numeric data as Atom throws an exception */ - @Test + @Test(groups ={ "Functional" }) public void testStringConstructor_malformed() { try diff --git a/test/MCview/BondTest.java b/test/MCview/BondTest.java index 6f701e2..4bdfff7 100644 --- a/test/MCview/BondTest.java +++ b/test/MCview/BondTest.java @@ -7,7 +7,7 @@ import org.testng.annotations.Test; public class BondTest { - @Test + @Test(groups ={ "Functional" }) public void testTranslate() { Atom a1 = new Atom(1f, 2f, 3f); diff --git a/test/MCview/PDBChainTest.java b/test/MCview/PDBChainTest.java index 07f9bd5..da49f22 100644 --- a/test/MCview/PDBChainTest.java +++ b/test/MCview/PDBChainTest.java @@ -38,7 +38,7 @@ public class PDBChainTest c = new PDBChain("1GAQ", "A"); } - @Test + @Test(groups ={ "Functional" }) public void testGetNewlineString() { assertEquals(System.lineSeparator(), c.getNewlineString()); @@ -46,7 +46,7 @@ public class PDBChainTest assertEquals("gaga", c.getNewlineString()); } - @Test + @Test(groups ={ "Functional" }) public void testPrint() { c.offset = 7; @@ -74,7 +74,7 @@ public class PDBChainTest * Test the method that constructs a Bond between two atoms and adds it to the * chain's list of bonds */ - @Test + @Test(groups ={ "Functional" }) public void testMakeBond() { /* @@ -109,7 +109,7 @@ public class PDBChainTest assertEquals(3f, b2.end[2], 0.0001f); } - @Test + @Test(groups ={ "Functional" }) public void testSetChainColours_colour() { c.makeBond(a1, a2); @@ -126,7 +126,7 @@ public class PDBChainTest * Test setting bond start/end colours based on a colour scheme i.e. colour by * residue */ - @Test + @Test(groups ={ "Functional" }) public void testSetChainColours_colourScheme() { Color alaColour = new Color(204, 255, 0); @@ -154,7 +154,7 @@ public class PDBChainTest assertEquals(Color.gray, b.endCol); } - @Test + @Test(groups ={ "Functional" }) public void testGetChargeColour() { assertEquals(Color.red, PDBChain.getChargeColour("ASP")); @@ -169,7 +169,7 @@ public class PDBChainTest /** * Test the method that sets bond start/end colours by residue charge property */ - @Test + @Test(groups ={ "Functional" }) public void testSetChargeColours() { a1.resName = "ASP"; // red @@ -198,7 +198,7 @@ public class PDBChainTest /** * Test the method that converts the raw list of atoms to a list of residues */ - @Test + @Test(groups ={ "Functional" }) public void testMakeResidueList_noAnnotation() { Vector atoms = new Vector(); @@ -256,7 +256,7 @@ public class PDBChainTest * Test the method that converts the raw list of atoms to a list of residues, * including parsing of tempFactor to an alignment annotation */ - @Test + @Test(groups ={ "Functional" }) public void testMakeResidueList_withTempFactor() { Vector atoms = new Vector(); @@ -307,7 +307,7 @@ public class PDBChainTest * Test the method that constructs bonds between successive residues' CA or P * atoms */ - @Test + @Test(groups ={ "Functional" }) public void testMakeCaBondList() { c.isNa = true; @@ -338,7 +338,7 @@ public class PDBChainTest assertTrue(c.isNa); } - @Test + @Test(groups ={ "Functional" }) public void testMakeCaBondList_nucleotide() { c.isNa = false; @@ -370,7 +370,7 @@ public class PDBChainTest /** * Test the method that updates atoms with their alignment positions */ - @Test + @Test(groups ={ "Functional" }) public void testMakeExactMapping() { Vector atoms = new Vector(); diff --git a/test/MCview/PDBfileTest.java b/test/MCview/PDBfileTest.java index a4fd286..05680af 100644 --- a/test/MCview/PDBfileTest.java +++ b/test/MCview/PDBfileTest.java @@ -20,7 +20,7 @@ import org.testng.annotations.Test; public class PDBfileTest { - @Test + @Test(groups ={ "Functional" }) public void testIsRna() { SequenceI seq = new Sequence("Seq1", "CGAU"); @@ -42,7 +42,7 @@ public class PDBfileTest * * @throws IOException */ - @Test + @Test(groups ={ "Functional" }) public void testParse() throws IOException { /* @@ -104,7 +104,7 @@ public class PDBfileTest * * @throws IOException */ - @Test + @Test(groups ={ "Functional" }) public void testParse_withAnnotations_noSS() throws IOException { PDBfile pf = new PDBfile(true, false, false, "examples/3W5V.pdb", @@ -162,7 +162,7 @@ public class PDBfileTest * * @throws IOException */ - @Test + @Test(groups ={ "Functional" }) public void testParse_withJmol_noAnnotations() throws IOException { PDBfile pf = new PDBfile(false, true, false, "examples/3W5V.pdb", @@ -191,7 +191,7 @@ public class PDBfileTest * * @throws IOException */ - @Test + @Test(groups ={ "Functional" }) public void testParse_withJmolAddAlignmentAnnotations() throws IOException { @@ -248,7 +248,8 @@ public class PDBfileTest * @throws IOException */ - @Test(enabled = false) + @Test(groups = + { "Functional" }, enabled = false) public void testParse_withAnnotate3D() throws IOException { // TODO requires a mock for Annotate3D processing @@ -265,7 +266,7 @@ public class PDBfileTest private AlignmentAnnotation[] getAlignmentAnnotations(PDBfile pf) { AlignmentI al = new Alignment(pf.getSeqsAsArray()); - pf.addAnnotations((Alignment) al); + pf.addAnnotations(al); return al.getAlignmentAnnotation(); } } diff --git a/test/MCview/ResidueTest.java b/test/MCview/ResidueTest.java index b5ca0ed..bb7f796 100644 --- a/test/MCview/ResidueTest.java +++ b/test/MCview/ResidueTest.java @@ -10,7 +10,7 @@ import org.testng.annotations.Test; public class ResidueTest { - @Test + @Test(groups ={ "Functional" }) public void testFindAtom() { Atom a1 = new Atom(1f, 2f, 3f); diff --git a/test/com/stevesoft/pat/RegexWriterTest.java b/test/com/stevesoft/pat/RegexWriterTest.java index ea07aa2..d91119d 100644 --- a/test/com/stevesoft/pat/RegexWriterTest.java +++ b/test/com/stevesoft/pat/RegexWriterTest.java @@ -5,6 +5,7 @@ import static org.testng.AssertJUnit.assertEquals; import java.io.IOException; import java.io.StringWriter; +import org.testng.annotations.DataProvider; import org.testng.annotations.Test; /** @@ -25,6 +26,9 @@ public class RegexWriterTest * an input string * @throws Exception */ + + @Test(groups = + { "Functional" }, dataProvider = "testWriteParam") void test(String re, String inp) throws IOException { StringWriter sw = new StringWriter(); @@ -47,27 +51,50 @@ public class RegexWriterTest } } - @Test - public void testWrite() throws IOException + // @Test(groups ={ "Functional" }) + // public void testWrite() throws IOException + // { + // for (int n = 1; n <= 1; n++) + // { + // test("s/x/y/", "-----x123456789"); + // test("s/x/y/", "x123456789"); + // test("s/x/y/", "-----x"); + // test("s/x.*?x/y/", ".xx..x..x...x...x....x....x"); + // test("s/x.*x/[$&]/", "--x........x--xx"); + // test("s/x.*x/[$&]/", "--x........x------"); + // test("s/.$/a/m", "bb\nbbb\nbbbb\nbbbbb\nbbbbbb\nbbbbbbbbbbbb"); + // test("s/.$/a/", "123"); + // test("s/.$/a/", "bb\nbbb\nbbbb\nbbbbb\nbbbbbb\nbb"); + // test("s/^./a/", "bb\nbbb\nbbbb\nbbbbb\nbbbbbb\nbb"); + // test("s/$/a/", "bbb"); + // test("s/^/a/", "bbb"); + // test("s/^/a/", ""); + // test("s{.*}{N}", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"); + // test("s/.{0,7}/y/", "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"); + // test("s/x/$&/", "xxx"); + // } + // } + + @DataProvider(name = "testWriteParam") + public Object[][] regexTestParams() { - for (int n = 1; n <= 1; n++) + return new Object[][] { - test("s/x/y/", "-----x123456789"); - test("s/x/y/", "x123456789"); - test("s/x/y/", "-----x"); - test("s/x.*?x/y/", ".xx..x..x...x...x....x....x"); - test("s/x.*x/[$&]/", "--x........x--xx"); - test("s/x.*x/[$&]/", "--x........x------"); - test("s/.$/a/m", "bb\nbbb\nbbbb\nbbbbb\nbbbbbb\nbbbbbbbbbbbb"); - test("s/.$/a/", "123"); - test("s/.$/a/", "bb\nbbb\nbbbb\nbbbbb\nbbbbbb\nbb"); - test("s/^./a/", "bb\nbbb\nbbbb\nbbbbb\nbbbbbb\nbb"); - test("s/$/a/", "bbb"); - test("s/^/a/", "bbb"); - test("s/^/a/", ""); - test("s{.*}{N}", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"); - test("s/.{0,7}/y/", "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"); - test("s/x/$&/", "xxx"); - } + { "s/x/y/", "-----x123456789" }, + { "s/x/y/", "x123456789" }, + { "s/x/y/", "-----x" }, + { "s/x.*?x/y/", ".xx..x..x...x...x....x....x" }, + { "s/x.*x/[$&]/", "--x........x--xx" }, + { "s/x.*x/[$&]/", "--x........x------" }, + { "s/.$/a/m", "bb\nbbb\nbbbb\nbbbbb\nbbbbbb\nbbbbbbbbbbbb" }, + { "s/.$/a/", "123" }, + { "s/.$/a/", "bb\nbbb\nbbbb\nbbbbb\nbbbbbb\nbb" }, + { "s/^./a/", "bb\nbbb\nbbbb\nbbbbb\nbbbbbb\nbb" }, + { "s/$/a/", "bbb" }, + { "s/^/a/", "bbb" }, + { "s/^/a/", "" }, + { "s{.*}{N}", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }, + { "s/.{0,7}/y/", "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" }, + { "s/x/$&/", "xxx" } }; } } diff --git a/test/jalview/analysis/AAFrequencyTest.java b/test/jalview/analysis/AAFrequencyTest.java index eb496bb..77d592a 100644 --- a/test/jalview/analysis/AAFrequencyTest.java +++ b/test/jalview/analysis/AAFrequencyTest.java @@ -22,7 +22,7 @@ public class AAFrequencyTest private static final String P = AAFrequency.PROFILE; - @Test + @Test(groups ={ "Functional" }) public void testCalculate_noProfile() { SequenceI seq1 = new Sequence("Seq1", "CAGT"); @@ -65,7 +65,7 @@ public class AAFrequencyTest assertEquals("T", col.get(R)); } - @Test + @Test(groups ={ "Functional" }) public void testCalculate_withProfile() { SequenceI seq1 = new Sequence("Seq1", "CAGT"); @@ -100,7 +100,7 @@ public class AAFrequencyTest assertEquals(4, profile[1][1]); } - @Test + @Test(groups ={ "Functional" }) public void testCalculate_withProfileTiming() { SequenceI seq1 = new Sequence("Seq1", "CAGT"); @@ -122,7 +122,7 @@ public class AAFrequencyTest System.out.println(System.currentTimeMillis() - start); } - @Test + @Test(groups ={ "Functional" }) public void testGetPercentageFormat() { assertNull(AAFrequency.getPercentageFormat(0)); diff --git a/test/jalview/analysis/AlignSeqTest.java b/test/jalview/analysis/AlignSeqTest.java index ed686a7..34ae612 100644 --- a/test/jalview/analysis/AlignSeqTest.java +++ b/test/jalview/analysis/AlignSeqTest.java @@ -3,11 +3,11 @@ package jalview.analysis; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; -import org.junit.Test; +import org.testng.annotations.Test; public class AlignSeqTest { - @Test + @Test(groups ={ "Functional" }) public void testExtractGaps() { assertNull(AlignSeq.extractGaps(null, null)); diff --git a/test/jalview/analysis/AlignmentAnnotationUtilsTest.java b/test/jalview/analysis/AlignmentAnnotationUtilsTest.java index 606a840..7ba2035 100644 --- a/test/jalview/analysis/AlignmentAnnotationUtilsTest.java +++ b/test/jalview/analysis/AlignmentAnnotationUtilsTest.java @@ -45,7 +45,7 @@ public class AlignmentAnnotationUtilsTest /** * Test method that converts a (possibly null) array to a list. */ - @Test + @Test(groups ={ "Functional" }) public void testAsList() { // null array @@ -143,7 +143,7 @@ public class AlignmentAnnotationUtilsTest /** * Test a mixture of show/hidden annotations in/outside selection group. */ - @Test + @Test(groups ={ "Functional" }) public void testGetShownHiddenTypes_forSelectionGroup() { Map>> shownTypes = new HashMap>>(); @@ -222,7 +222,7 @@ public class AlignmentAnnotationUtilsTest * Test case where there are 'grouped' annotations, visible and hidden, within * and without the selection group. */ - @Test + @Test(groups ={ "Functional" }) public void testGetShownHiddenTypes_withGraphGroups() { final int GROUP_3 = 3; @@ -348,7 +348,7 @@ public class AlignmentAnnotationUtilsTest /** * Test method that determines visible graph groups. */ - @Test + @Test(groups ={ "Functional" }) public void testGetVisibleGraphGroups() { AlignmentAnnotation[] anns = alignment.getAlignmentAnnotation(); @@ -395,7 +395,7 @@ public class AlignmentAnnotationUtilsTest * Test for case where no sequence is selected. Shouldn't normally arise but * check it handles it gracefully. */ - @Test + @Test(groups ={ "Functional" }) public void testGetShownHiddenTypes_noSequenceSelected() { Map>> shownTypes = new HashMap>>(); diff --git a/test/jalview/analysis/AlignmentUtilsTests.java b/test/jalview/analysis/AlignmentUtilsTests.java index d44a6bc..61b2487 100644 --- a/test/jalview/analysis/AlignmentUtilsTests.java +++ b/test/jalview/analysis/AlignmentUtilsTests.java @@ -96,7 +96,7 @@ public class AlignmentUtilsTests public static Sequence ts = new Sequence("short", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklm"); - @Test + @Test(groups ={ "Functional" }) public void testExpandContext() { AlignmentI al = new Alignment(new Sequence[] {}); @@ -150,7 +150,7 @@ public class AlignmentUtilsTests /** * Test that annotations are correctly adjusted by expandContext */ - @Test + @Test(groups ={ "Functional" }) public void testExpandContext_annotation() { AlignmentI al = new Alignment(new Sequence[] @@ -240,7 +240,7 @@ public class AlignmentUtilsTests * * @throws IOException */ - @Test + @Test(groups ={ "Functional" }) public void testGetSequencesByName() throws IOException { final String data = ">Seq1Name\nKQYL\n" + ">Seq2Name\nRFPW\n" @@ -278,7 +278,7 @@ public class AlignmentUtilsTests * * @throws IOException */ - @Test + @Test(groups ={ "Functional" }) public void testMapProteinToCdna_noXrefs() throws IOException { List protseqs = new ArrayList(); @@ -341,7 +341,7 @@ public class AlignmentUtilsTests /** * Test for the alignSequenceAs method that takes two sequences and a mapping. */ - @Test + @Test(groups ={ "Functional" }) public void testAlignSequenceAs_withMapping_noIntrons() { MapList map = new MapList(new int[] @@ -387,7 +387,7 @@ public class AlignmentUtilsTests /** * Test for the alignSequenceAs method that takes two sequences and a mapping. */ - @Test + @Test(groups ={ "Functional" }) public void testAlignSequenceAs_withMapping_withIntrons() { /* @@ -437,7 +437,7 @@ public class AlignmentUtilsTests /** * Test for the case where not all of the protein sequence is mapped to cDNA. */ - @Test + @Test(groups ={ "Functional" }) public void testAlignSequenceAs_withMapping_withUnmappedProtein() { @@ -487,7 +487,7 @@ public class AlignmentUtilsTests /** * Test for the alignSequenceAs method where we preserve gaps in introns only. */ - @Test + @Test(groups ={ "Functional" }) public void testAlignSequenceAs_keepIntronGapsOnly() { @@ -506,7 +506,7 @@ public class AlignmentUtilsTests * Test for the method that generates an aligned translated sequence from one * mapping. */ - @Test + @Test(groups ={ "Functional" }) public void testGetAlignedTranslation_dnaLikeProtein() { // dna alignment will be replaced @@ -530,7 +530,7 @@ public class AlignmentUtilsTests /** * Test the method that realigns protein to match mapped codon alignment. */ - @Test + @Test(groups ={ "Functional" }) public void testAlignProteinAsDna() { // seq1 codons are [1,2,3] [4,5,6] [7,8,9] [10,11,12] @@ -574,7 +574,7 @@ public class AlignmentUtilsTests * Test the method that tests whether a CDNA sequence translates to a protein * sequence */ - @Test + @Test(groups ={ "Functional" }) public void testTranslatesAs() { assertTrue(AlignmentUtils.translatesAs("tttcccaaaggg".toCharArray(), 0, @@ -613,7 +613,7 @@ public class AlignmentUtilsTests * * @throws IOException */ - @Test + @Test(groups ={ "Functional" }) public void testMapProteinToCdna_withStartAndStopCodons() throws IOException { @@ -706,7 +706,7 @@ public class AlignmentUtilsTests * * @throws IOException */ - @Test + @Test(groups ={ "Functional" }) public void testMapProteinToCdna_withXrefs() throws IOException { List protseqs = new ArrayList(); @@ -782,7 +782,7 @@ public class AlignmentUtilsTests * * @throws IOException */ - @Test + @Test(groups ={ "Functional" }) public void testMapProteinToCdna_prioritiseXrefs() throws IOException { List protseqs = new ArrayList(); @@ -832,7 +832,7 @@ public class AlignmentUtilsTests * Test the method that shows or hides sequence annotations by type(s) and * selection group. */ - @Test + @Test(groups ={ "Functional" }) public void testShowOrHideSequenceAnnotations() { SequenceI seq1 = new Sequence("Seq1", "AAA"); @@ -940,7 +940,7 @@ public class AlignmentUtilsTests /** * Tests for the method that checks if one sequence cross-references another */ - @Test + @Test(groups ={ "Functional" }) public void testHasCrossRef() { assertFalse(AlignmentUtils.hasCrossRef(null, null)); @@ -969,7 +969,7 @@ public class AlignmentUtilsTests * Tests for the method that checks if either sequence cross-references the * other */ - @Test + @Test(groups ={ "Functional" }) public void testHaveCrossRef() { assertFalse(AlignmentUtils.hasCrossRef(null, null)); @@ -999,7 +999,7 @@ public class AlignmentUtilsTests /** * Test the method that extracts the exon-only part of a dna alignment. */ - @Test + @Test(groups ={ "Functional" }) public void testMakeExonAlignment() { SequenceI dna1 = new Sequence("dna1", "aaaGGGcccTTTaaa"); @@ -1094,7 +1094,7 @@ public class AlignmentUtilsTests * already has a protein product (Uniprot translation) which in turn has an * x-ref to the EMBLCDS record. */ - @Test + @Test(groups ={ "Functional" }) public void testMakeExonSequences() { SequenceI dna1 = new Sequence("dna1", "aaaGGGcccTTTaaa"); @@ -1136,7 +1136,7 @@ public class AlignmentUtilsTests * its product mappings, for the case where there are multiple exon mappings * to different protein products. */ - @Test + @Test(groups ={ "Functional" }) public void testMakeExonAlignment_multipleProteins() { SequenceI dna1 = new Sequence("dna1", "aaaGGGcccTTTaaa"); diff --git a/test/jalview/analysis/AnnotationSorterTest.java b/test/jalview/analysis/AnnotationSorterTest.java index 6149048..37bfca4 100644 --- a/test/jalview/analysis/AnnotationSorterTest.java +++ b/test/jalview/analysis/AnnotationSorterTest.java @@ -84,7 +84,7 @@ public class AnnotationSorterTest * sequence ref * */ - @Test + @Test(groups ={ "Functional" }) public void testSortBySequenceAndType_autocalcLast() { // @formatter:off @@ -111,7 +111,7 @@ public class AnnotationSorterTest /** * Variant with autocalculated annotations sorting to front */ - @Test + @Test(groups ={ "Functional" }) public void testSortBySequenceAndType_autocalcFirst() { // @formatter:off @@ -147,7 +147,7 @@ public class AnnotationSorterTest * sequence ref * */ - @Test + @Test(groups ={ "Functional" }) public void testSortByTypeAndSequence_autocalcLast() { // @formatter:off @@ -174,7 +174,7 @@ public class AnnotationSorterTest /** * Variant of test with autocalculated annotations sorted to front */ - @Test + @Test(groups ={ "Functional" }) public void testSortByTypeAndSequence_autocalcFirst() { // @formatter:off @@ -202,7 +202,7 @@ public class AnnotationSorterTest * Variant of test with autocalculated annotations sorted to front but * otherwise no change. */ - @Test + @Test(groups ={ "Functional" }) public void testNoSort_autocalcFirst() { // @formatter:off @@ -226,7 +226,7 @@ public class AnnotationSorterTest assertEquals("Structure", anns[6].label); } - @Test + @Test(groups ={ "Functional" }) public void testSort_timingPresorted() { testTiming_presorted(50, 100); @@ -269,7 +269,7 @@ public class AnnotationSorterTest /** * Timing tests for sorting randomly sorted annotations for various sizes. */ - @Test + @Test(groups ={ "Functional" }) public void testSort_timingUnsorted() { testTiming_unsorted(50, 100); @@ -313,7 +313,7 @@ public class AnnotationSorterTest /** * Timing test for sorting annotations with a limited range of types (labels). */ - @Test + @Test(groups ={ "Functional" }) public void testSort_timingSemisorted() { testTiming_semiSorted(50, 100); diff --git a/test/jalview/analysis/CodingUtilsTest.java b/test/jalview/analysis/CodingUtilsTest.java index e787ac3..429c9ed 100644 --- a/test/jalview/analysis/CodingUtilsTest.java +++ b/test/jalview/analysis/CodingUtilsTest.java @@ -10,7 +10,7 @@ import org.testng.annotations.Test; public class CodingUtilsTest { - @Test + @Test(groups ={ "Functional" }) public void testDecodeCodon() { assertTrue(Arrays.equals(new char[] @@ -31,7 +31,7 @@ public class CodingUtilsTest { 'T', 'T', 'T' }, CodingUtils.decodeCodon(63))); } - @Test + @Test(groups ={ "Functional" }) public void testDecodeNucleotide() { assertEquals('A', CodingUtils.decodeNucleotide(0)); @@ -41,7 +41,7 @@ public class CodingUtilsTest assertEquals('0', CodingUtils.decodeNucleotide(4)); } - @Test + @Test(groups ={ "Functional" }) public void testEncodeCodon() { assertTrue(CodingUtils.encodeCodon('Z') < 0); diff --git a/test/jalview/analysis/CrossRefTest.java b/test/jalview/analysis/CrossRefTest.java index 095fc05..bd737fa 100644 --- a/test/jalview/analysis/CrossRefTest.java +++ b/test/jalview/analysis/CrossRefTest.java @@ -9,7 +9,7 @@ import org.testng.annotations.Test; public class CrossRefTest { - @Test + @Test(groups ={ "Functional" }) public void testFindXDbRefs() { DBRefEntry ref1 = new DBRefEntry("UNIPROT", "1", "A123"); diff --git a/test/jalview/analysis/DnaTest.java b/test/jalview/analysis/DnaTest.java index 6371315..55908dd 100644 --- a/test/jalview/analysis/DnaTest.java +++ b/test/jalview/analysis/DnaTest.java @@ -94,7 +94,7 @@ public class DnaTest * * @throws IOException */ - @Test + @Test(groups ={ "Functional" }) public void testTranslateCdna_withUntranslatableCodons() throws IOException { @@ -116,7 +116,7 @@ public class DnaTest * * @throws IOException */ - @Test + @Test(groups ={ "Functional" }) public void testTranslateCdna_withUntranslatableCodonsAndHiddenColumns() throws IOException { @@ -152,7 +152,7 @@ public class DnaTest * * @throws IOException */ - @Test + @Test(groups ={ "Functional" }) public void testTranslateCdna_simple() throws IOException { AlignmentI alf = new FormatAdapter().readFile(fasta, @@ -173,7 +173,7 @@ public class DnaTest * * @throws IOException */ - @Test + @Test(groups ={ "Functional" }) public void testTranslateCdna_hiddenColumns() throws IOException { AlignmentI alf = new FormatAdapter().readFile(fasta, @@ -193,7 +193,7 @@ public class DnaTest /** * Use this test to help debug into any cases of interest. */ - @Test + @Test(groups ={ "Functional" }) public void testCompareCodonPos_oneOnly() { assertFollows("-AA--A", "G--GG"); // 2 shifted seq2, 3 shifted seq1 @@ -202,7 +202,7 @@ public class DnaTest /** * Tests for method that compares 'alignment' of two codon position triplets. */ - @Test + @Test(groups ={ "Functional" }) public void testCompareCodonPos() { /* @@ -259,7 +259,7 @@ public class DnaTest * reorders the cDNA and retranslates, and verifies that the translations are * the same (apart from ordering). */ - @Test + @Test(groups ={ "Functional" }) public void testTranslateCdna_sequenceOrderIndependent() { /* @@ -313,7 +313,7 @@ public class DnaTest * Test that all the cases in testCompareCodonPos have a 'symmetric' * comparison (without checking the actual comparison result). */ - @Test + @Test(groups ={ "Functional" }) public void testCompareCodonPos_isSymmetric() { assertSymmetric("AAA", "GGG"); @@ -436,7 +436,7 @@ public class DnaTest /** * Weirdly, maybe worth a test to prove the helper method of this test class. */ - @Test + @Test(groups ={ "Functional" }) public void testConvertCodon() { assertEquals("[0, 1, 2]", convertCodon("AAA").toString()); diff --git a/test/jalview/analysis/GroupingTest.java b/test/jalview/analysis/GroupingTest.java index df04243..4698d0d 100644 --- a/test/jalview/analysis/GroupingTest.java +++ b/test/jalview/analysis/GroupingTest.java @@ -37,7 +37,7 @@ public class GroupingTest int[] positions = new int[] { 1, 7, 9 }; - @Test + @Test(groups ={ "Functional" }) public void testMakeGroupsWithBoth() { ArrayList str = new ArrayList(); diff --git a/test/jalview/analysis/ParsePropertiesTest.java b/test/jalview/analysis/ParsePropertiesTest.java index 90faedc..221d47e 100644 --- a/test/jalview/analysis/ParsePropertiesTest.java +++ b/test/jalview/analysis/ParsePropertiesTest.java @@ -46,7 +46,7 @@ public class ParsePropertiesTest * more 'number characters' (0-9+.), i.e. greedily matches any trailing * numeric part of the string */ - @Test + @Test(groups ={ "Functional" }) public void testGetScoresFromDescription() { String regex = ".*([-0-9.+]+)"; @@ -82,7 +82,7 @@ public class ParsePropertiesTest * character, followed by at least one 'number character', then any trailing * characters. */ - @Test + @Test(groups ={ "Functional" }) public void testGetScoresFromDescription_twoScores() { String regex = ".*([-0-9.+]+).+([-0-9.+]+).*"; @@ -144,7 +144,7 @@ public class ParsePropertiesTest * * @see AlignFrame.extractScores_actionPerformed */ - @Test + @Test(groups ={ "Functional" }) public void testGetScoresFromDescription_wordBoundaries() { String regex = "\\W*([-+eE0-9.]+)"; diff --git a/test/jalview/analysis/RnaTest.java b/test/jalview/analysis/RnaTest.java index 165192c..3676e0b 100644 --- a/test/jalview/analysis/RnaTest.java +++ b/test/jalview/analysis/RnaTest.java @@ -10,7 +10,7 @@ import java.util.Vector; import org.testng.annotations.Test; public class RnaTest { - @Test + @Test(groups ={ "Functional" }) public void testGetSimpleBPs() throws WUSSParseException { String rna = "([{})]"; // JAL-1081 example @@ -28,7 +28,7 @@ public class RnaTest assertEquals(5, bps.get(2).bp3); // ] } - @Test + @Test(groups ={ "Functional" }) public void testGetSimpleBPs_unmatchedOpener() { String rna = "(([{})]"; @@ -42,7 +42,7 @@ public class RnaTest } } - @Test + @Test(groups ={ "Functional" }) public void testGetSimpleBPs_unmatchedCloser() { String rna = "([{})]]"; diff --git a/test/jalview/analysis/TestAlignSeq.java b/test/jalview/analysis/TestAlignSeq.java index 81bcf86..81514a4 100644 --- a/test/jalview/analysis/TestAlignSeq.java +++ b/test/jalview/analysis/TestAlignSeq.java @@ -59,7 +59,7 @@ public class TestAlignSeq } - @Test + @Test(groups ={ "Functional" }) /** * simple test that mapping from alignment corresponds identical positions. */ @@ -86,7 +86,7 @@ public class TestAlignSeq } } - @Test + @Test(groups ={ "Functional" }) public void testExtractGaps() { assertNull(AlignSeq.extractGaps(null, null)); @@ -96,7 +96,7 @@ public class TestAlignSeq assertEquals("ABCD", AlignSeq.extractGaps(" .-", ". -A-B.C D.")); } - @Test + @Test(groups ={ "Functional" }) public void testPrintAlignment() { AlignSeq as = AlignSeq.doGlobalNWAlignment(s1, s3, AlignSeq.PEP); diff --git a/test/jalview/analysis/scoremodels/FeatureScoreModelTest.java b/test/jalview/analysis/scoremodels/FeatureScoreModelTest.java index 5ab0bb0..221b230 100644 --- a/test/jalview/analysis/scoremodels/FeatureScoreModelTest.java +++ b/test/jalview/analysis/scoremodels/FeatureScoreModelTest.java @@ -23,7 +23,7 @@ public class FeatureScoreModelTest int[] sf3 = new int[] { -1, -1, -1, -1, -1, -1, 76, 77 }; - @Test + @Test(groups ={ "Functional" }) public void testFeatureScoreModel() throws Exception { AlignFrame alf = new FileLoader(false).LoadFileWaitTillLoaded(alntestFile, diff --git a/test/jalview/bin/CommandLineOperations.java b/test/jalview/bin/CommandLineOperations.java index 05ada31..3582dc5 100644 --- a/test/jalview/bin/CommandLineOperations.java +++ b/test/jalview/bin/CommandLineOperations.java @@ -114,7 +114,8 @@ public class CommandLineOperations new CommandLineOperations(); } - @Test(dataProvider = "headlessModeOutputParams") + @Test(groups = + { "Functional" }, dataProvider = "headlessModeOutputParams") public void testHeadlessModeOutputs(String harg, String type, String fileName, boolean withAWT, int expectedMinFileSize) { diff --git a/test/jalview/commands/EditCommandTest.java b/test/jalview/commands/EditCommandTest.java index 6c570d5..3591648 100644 --- a/test/jalview/commands/EditCommandTest.java +++ b/test/jalview/commands/EditCommandTest.java @@ -50,7 +50,7 @@ public class EditCommandTest /** * Test inserting gap characters */ - @Test + @Test(groups ={ "Functional" }) public void testAppendEdit_insertGap() { // set a non-standard gap character to prove it is actually used @@ -67,7 +67,7 @@ public class EditCommandTest * Test deleting characters from sequences. Note the deleteGap() action does * not check that only gap characters are being removed. */ - @Test + @Test(groups ={ "Functional" }) public void testAppendEdit_deleteGap() { testee.appendEdit(Action.DELETE_GAP, seqs, 4, 3, al, true); @@ -81,7 +81,7 @@ public class EditCommandTest * Test a cut action. The command should store the cut characters to support * undo. */ - @Test + @Test(groups ={ "Functional" }) public void testCut() { Edit ec = testee.new Edit(Action.CUT, seqs, 4, 3, al); @@ -102,7 +102,8 @@ public class EditCommandTest /** * Test a Paste action, where this adds sequences to an alignment. */ - @Test(enabled = false) + @Test(groups = + { "Functional" }, enabled = false) // TODO fix so it works public void testPaste_addToAlignment() { @@ -122,7 +123,7 @@ public class EditCommandTest /** * Test insertGap followed by undo command */ - @Test + @Test(groups ={ "Functional" }) public void testUndo_insertGap() { // Edit ec = testee.new Edit(Action.INSERT_GAP, seqs, 4, 3, '?'); @@ -140,7 +141,7 @@ public class EditCommandTest /** * Test deleteGap followed by undo command */ - @Test + @Test(groups ={ "Functional" }) public void testUndo_deleteGap() { testee.appendEdit(Action.DELETE_GAP, seqs, 4, 3, al, true); @@ -158,7 +159,7 @@ public class EditCommandTest /** * Test several commands followed by an undo command */ - @Test + @Test(groups ={ "Functional" }) public void testUndo_multipleCommands() { // delete positions 3/4/5 (counting from 1) @@ -187,7 +188,7 @@ public class EditCommandTest * Unit test for JAL-1594 bug: click and drag sequence right to insert gaps - * undo did not remove them all. */ - @Test + @Test(groups ={ "Functional" }) public void testUndo_multipleInsertGaps() { testee.appendEdit(Action.INSERT_GAP, seqs, 4, 1, al, true); @@ -205,7 +206,7 @@ public class EditCommandTest /** * Test cut followed by undo command */ - @Test + @Test(groups ={ "Functional" }) public void testUndo_cut() { testee.appendEdit(Action.CUT, seqs, 4, 3, al, true); @@ -222,7 +223,7 @@ public class EditCommandTest /** * Test the replace command (used to manually edit a sequence) */ - @Test + @Test(groups ={ "Functional" }) public void testReplace() { // seem to need a dataset sequence on the edited sequence here @@ -239,7 +240,7 @@ public class EditCommandTest * Test that the addEdit command correctly merges insert gap commands when * possible. */ - @Test + @Test(groups ={ "Functional" }) public void testAddEdit_multipleInsertGap() { /* @@ -289,7 +290,7 @@ public class EditCommandTest * Test that the addEdit command correctly merges delete gap commands when * possible. */ - @Test + @Test(groups ={ "Functional" }) public void testAddEdit_multipleDeleteGap() { /* @@ -346,7 +347,7 @@ public class EditCommandTest * case when they appear contiguous but are acting on different sequences. * They should not be merged. */ - @Test + @Test(groups ={ "Functional" }) public void testAddEdit_removeAllGaps() { seqs[0].setSequence("a???bcdefghjk"); @@ -367,7 +368,7 @@ public class EditCommandTest * Test that the addEdit command correctly merges insert gap commands acting * on a multi-sequence selection. */ - @Test + @Test(groups ={ "Functional" }) public void testAddEdit_groupInsertGaps() { /* @@ -403,7 +404,7 @@ public class EditCommandTest *
  • last: --A--B-CDEF
  • * */ - @Test + @Test(groups ={ "Functional" }) public void testPriorState_multipleInserts() { EditCommand command = new EditCommand(); @@ -431,7 +432,7 @@ public class EditCommandTest *
  • End: ABC
  • * */ - @Test + @Test(groups ={ "Functional" }) public void testPriorState_removeAllGaps() { EditCommand command = new EditCommand(); @@ -452,7 +453,7 @@ public class EditCommandTest /** * Test for 'undoing' a single delete edit. */ - @Test + @Test(groups ={ "Functional" }) public void testPriorState_singleDelete() { EditCommand command = new EditCommand(); @@ -471,7 +472,7 @@ public class EditCommandTest /** * Test 'undoing' a single gap insertion edit command. */ - @Test + @Test(groups ={ "Functional" }) public void testPriorState_singleInsert() { EditCommand command = new EditCommand(); @@ -491,7 +492,7 @@ public class EditCommandTest * Test that mimics 'remove all gaps' action. This generates delete gap edits * for contiguous gaps in each sequence separately. */ - @Test + @Test(groups ={ "Functional" }) public void testPriorState_removeGapsMultipleSeqs() { EditCommand command = new EditCommand(); @@ -555,7 +556,7 @@ public class EditCommandTest * series Delete Gap edits that each act on all sequences that share a gapped * column region. */ - @Test + @Test(groups ={ "Functional" }) public void testPriorState_removeGappedCols() { EditCommand command = new EditCommand(); diff --git a/test/jalview/datamodel/AlignedCodonFrameTest.java b/test/jalview/datamodel/AlignedCodonFrameTest.java index 63f6772..35d92d3 100644 --- a/test/jalview/datamodel/AlignedCodonFrameTest.java +++ b/test/jalview/datamodel/AlignedCodonFrameTest.java @@ -15,7 +15,7 @@ public class AlignedCodonFrameTest /** * Test the method that locates the first aligned sequence that has a mapping. */ - @Test + @Test(groups ={ "Functional" }) public void testFindAlignedSequence() { AlignmentI cdna = new Alignment(new SequenceI[] @@ -63,7 +63,7 @@ public class AlignedCodonFrameTest /** * Test the method that locates the mapped codon for a protein position. */ - @Test + @Test(groups ={ "Functional" }) public void testGetMappedRegion() { // introns lower case, exons upper case @@ -111,7 +111,7 @@ public class AlignedCodonFrameTest assertNull(acf.getMappedRegion(seq1, aseq2, 1)); } - @Test + @Test(groups ={ "Functional" }) public void testGetMappedCodon() { final Sequence seq1 = new Sequence("Seq1", "c-G-TA-gC-gT-T"); diff --git a/test/jalview/datamodel/AlignedCodonIteratorTest.java b/test/jalview/datamodel/AlignedCodonIteratorTest.java index 65fe4bf..d9c7e12 100644 --- a/test/jalview/datamodel/AlignedCodonIteratorTest.java +++ b/test/jalview/datamodel/AlignedCodonIteratorTest.java @@ -21,7 +21,7 @@ public class AlignedCodonIteratorTest /** * Test normal case for iterating over aligned codons. */ - @Test + @Test(groups ={ "Functional" }) public void testNext() { SequenceI from = new Sequence("Seq1", "-CgC-C-cCtAG-AtG-Gc"); @@ -49,7 +49,7 @@ public class AlignedCodonIteratorTest /** * Test weird case where the mapping skips over a peptide. */ - @Test + @Test(groups ={ "Functional" }) public void testNext_unmappedPeptide() { SequenceI from = new Sequence("Seq1", "-CgC-C-cCtAG-AtG-Gc"); @@ -77,7 +77,7 @@ public class AlignedCodonIteratorTest /** * Test for exception thrown for an incomplete codon. */ - @Test + @Test(groups ={ "Functional" }) public void testNext_incompleteCodon() { SequenceI from = new Sequence("Seq1", "-CgC-C-cCgTt"); @@ -106,7 +106,7 @@ public class AlignedCodonIteratorTest /** * Test normal case for iterating over aligned codons. */ - @Test + @Test(groups ={ "Functional" }) public void testAnother() { SequenceI from = new Sequence("Seq1", "TGCCATTACCAG-"); diff --git a/test/jalview/datamodel/AlignedCodonTest.java b/test/jalview/datamodel/AlignedCodonTest.java index afa6169..a6802b1 100644 --- a/test/jalview/datamodel/AlignedCodonTest.java +++ b/test/jalview/datamodel/AlignedCodonTest.java @@ -9,7 +9,7 @@ import org.testng.annotations.Test; public class AlignedCodonTest { - @Test + @Test(groups ={ "Functional" }) public void testEquals() { AlignedCodon ac = new AlignedCodon(1, 3, 4); @@ -20,7 +20,7 @@ public class AlignedCodonTest assertTrue(ac.equals(ac)); } - @Test + @Test(groups ={ "Functional" }) public void testToString() { AlignedCodon ac = new AlignedCodon(1, 3, 4); assertEquals("[1, 3, 4]", ac.toString()); diff --git a/test/jalview/datamodel/AlignmentAnnotationTests.java b/test/jalview/datamodel/AlignmentAnnotationTests.java index 4c9eabe..d32105d 100644 --- a/test/jalview/datamodel/AlignmentAnnotationTests.java +++ b/test/jalview/datamodel/AlignmentAnnotationTests.java @@ -10,7 +10,7 @@ import org.testng.annotations.Test; public class AlignmentAnnotationTests { - @Test + @Test(groups ={ "Functional" }) public void testCopyConstructor() { SequenceI sq = new Sequence("Foo", "ARAARARARAWEAWEAWRAWEAWE"); @@ -74,7 +74,7 @@ public class AlignmentAnnotationTests * different dataset frames (annotation transferred by mapping between * sequences) */ - @Test + @Test(groups ={ "Functional" }) public void testLiftOver() { SequenceI sqFrom = new Sequence("fromLong", "QQQCDEWGH"); @@ -157,7 +157,7 @@ public class AlignmentAnnotationTests } } - @Test + @Test(groups ={ "Functional" }) public void testAdjustForAlignment() { SequenceI seq = new Sequence("TestSeq", "ABCDEFG"); diff --git a/test/jalview/datamodel/AlignmentTest.java b/test/jalview/datamodel/AlignmentTest.java index 036f2cf..e885733 100644 --- a/test/jalview/datamodel/AlignmentTest.java +++ b/test/jalview/datamodel/AlignmentTest.java @@ -94,7 +94,7 @@ public class AlignmentTest /** * Test method that returns annotations that match on calcId. */ - @Test + @Test(groups ={ "Functional" }) public void testFindAnnotation_byCalcId() { Iterable anns = al @@ -106,7 +106,7 @@ public class AlignmentTest assertFalse(iter.hasNext()); } - @Test + @Test(groups ={ "Functional" }) public void testDeleteAllAnnotations_includingAutocalculated() { AlignmentAnnotation aa = new AlignmentAnnotation("Consensus", @@ -120,7 +120,7 @@ public class AlignmentTest assertEquals("Not all deleted", 0, al.getAlignmentAnnotation().length); } - @Test + @Test(groups ={ "Functional" }) public void testDeleteAllAnnotations_excludingAutocalculated() { AlignmentAnnotation aa = new AlignmentAnnotation("Consensus", @@ -144,7 +144,7 @@ public class AlignmentTest * * @throws IOException */ - @Test + @Test(groups ={ "Functional" }) public void testAlignAs_dnaAsDna() throws IOException { // aligned cDNA: @@ -176,7 +176,7 @@ public class AlignmentTest * * @throws IOException */ - @Test + @Test(groups ={ "Functional" }) public void testAlignAs_proteinAsCdna() throws IOException { // see also AlignmentUtilsTests @@ -200,7 +200,7 @@ public class AlignmentTest * * @throws IOException */ - @Test + @Test(groups ={ "Functional" }) public void testAlignAs_cdnaAsProtein() throws IOException { /* @@ -232,7 +232,7 @@ public class AlignmentTest * * @throws IOException */ - @Test + @Test(groups ={ "Functional" }) public void testAlignAs_dnaAsProtein_withIntrons() throws IOException { /* diff --git a/test/jalview/datamodel/ColumnSelectionTest.java b/test/jalview/datamodel/ColumnSelectionTest.java index 2ffebe0..38e9c93 100644 --- a/test/jalview/datamodel/ColumnSelectionTest.java +++ b/test/jalview/datamodel/ColumnSelectionTest.java @@ -9,7 +9,7 @@ import org.testng.annotations.Test; public class ColumnSelectionTest { - @Test + @Test(groups ={ "Functional" }) public void testAddElement() { ColumnSelection cs = new ColumnSelection(); @@ -25,7 +25,7 @@ public class ColumnSelectionTest * Test the remove method - in particular to verify that remove(int i) removes * the element whose value is i, _NOT_ the i'th element. */ - @Test + @Test(groups ={ "Functional" }) public void testRemoveElement() { ColumnSelection cs = new ColumnSelection(); @@ -50,7 +50,7 @@ public class ColumnSelectionTest * Test the method that finds the visible column position of an alignment * column, allowing for hidden columns. */ - @Test + @Test(groups ={ "Functional" }) public void testFindColumnPosition() { ColumnSelection cs = new ColumnSelection(); diff --git a/test/jalview/datamodel/DBRefEntryTest.java b/test/jalview/datamodel/DBRefEntryTest.java index b5549f0..f00cb38 100644 --- a/test/jalview/datamodel/DBRefEntryTest.java +++ b/test/jalview/datamodel/DBRefEntryTest.java @@ -13,7 +13,7 @@ public class DBRefEntryTest /** * Tests for the method that compares equality of reference (but not mapping) */ - @Test + @Test(groups ={ "Functional" }) public void testEqualRef() { DBRefEntry ref1 = new DBRefEntry("UNIPROT", "1", "V71633"); diff --git a/test/jalview/datamodel/MappingTest.java b/test/jalview/datamodel/MappingTest.java index 378d708..cb528aa 100644 --- a/test/jalview/datamodel/MappingTest.java +++ b/test/jalview/datamodel/MappingTest.java @@ -17,7 +17,7 @@ public class MappingTest * trite test of the intersectVisContigs method for a simple DNA -> Protein * exon map and a range of visContigs */ - @Test + @Test(groups ={ "Functional" }) public void testIntersectVisContigs() { MapList fk = new MapList(new int[] diff --git a/test/jalview/datamodel/PDBEntryTest.java b/test/jalview/datamodel/PDBEntryTest.java index 093702f..68c3ddf 100644 --- a/test/jalview/datamodel/PDBEntryTest.java +++ b/test/jalview/datamodel/PDBEntryTest.java @@ -19,7 +19,7 @@ public class PDBEntryTest { } - @Test + @Test(groups ={ "Functional" }) public void test() { try diff --git a/test/jalview/datamodel/SearchResultsTest.java b/test/jalview/datamodel/SearchResultsTest.java index 7f099c8..b576569 100644 --- a/test/jalview/datamodel/SearchResultsTest.java +++ b/test/jalview/datamodel/SearchResultsTest.java @@ -7,7 +7,7 @@ import org.testng.annotations.Test; public class SearchResultsTest { - @Test + @Test(groups ={ "Functional" }) public void testToString() { SequenceI seq = new Sequence("", "abcdefghijklm"); diff --git a/test/jalview/datamodel/SeqCigarTest.java b/test/jalview/datamodel/SeqCigarTest.java index b8748b6..3b50ce1 100644 --- a/test/jalview/datamodel/SeqCigarTest.java +++ b/test/jalview/datamodel/SeqCigarTest.java @@ -15,7 +15,7 @@ public class SeqCigarTest * * TODO: split into separate tests */ - @Test + @Test(groups ={ "Functional" }) public void testSomething() throws Exception { String o_seq = "asdfktryasdtqwrtsaslldddptyipqqwaslchvhttt"; diff --git a/test/jalview/datamodel/SequenceDummyTest.java b/test/jalview/datamodel/SequenceDummyTest.java index 2fc1934..4629a47 100644 --- a/test/jalview/datamodel/SequenceDummyTest.java +++ b/test/jalview/datamodel/SequenceDummyTest.java @@ -1,15 +1,17 @@ package jalview.datamodel; +import static org.testng.AssertJUnit.assertFalse; +import static org.testng.AssertJUnit.assertTrue; + +import org.testng.annotations.Test; -import org.junit.Assert; -import org.junit.Test; public class SequenceDummyTest { /** * test for become method */ - @Test + @Test(groups ={ "Functional" }) public void testBecome() { SequenceI seq = new Sequence("OrigSeq", "ASEQUENCE"); @@ -19,9 +21,9 @@ public class SequenceDummyTest SequenceDummy dummySeq = new SequenceDummy("OrigSeq"); dummySeq.addSequenceFeature(ofeat); dummySeq.become(seq); - Assert.assertFalse("Dummy sequence did not become a full sequence", + assertFalse("Dummy sequence did not become a full sequence", dummySeq.isDummy()); - Assert.assertTrue("Sequence was not updated from template", seq + assertTrue("Sequence was not updated from template", seq .getSequenceAsString().equals(dummySeq.getSequenceAsString())); boolean found = false; for (SequenceFeature sf : dummySeq.getSequenceFeatures()) @@ -32,7 +34,7 @@ public class SequenceDummyTest break; } } - Assert.assertTrue("Didn't retain original sequence feature", found); + assertTrue("Didn't retain original sequence feature", found); // todo - should test all aspect of copy constructor } diff --git a/test/jalview/datamodel/SequenceTest.java b/test/jalview/datamodel/SequenceTest.java index b216b13..78eb66c 100644 --- a/test/jalview/datamodel/SequenceTest.java +++ b/test/jalview/datamodel/SequenceTest.java @@ -20,7 +20,7 @@ public class SequenceTest { seq = new Sequence("FER1", "AKPNGVL"); } - @Test + @Test(groups ={ "Functional" }) public void testInsertGapsAndGapmaps() { SequenceI aseq = seq.deriveSequence(); @@ -35,7 +35,7 @@ public class SequenceTest assertEquals("Gap interval 2 end wrong", 8, gapInt.get(1)[1]); } - @Test + @Test(groups ={ "Functional" }) public void testGetAnnotation() { // initial state returns null not an empty array @@ -51,7 +51,7 @@ public class SequenceTest assertNull(seq.getAnnotation()); } - @Test + @Test(groups ={ "Functional" }) public void testGetAnnotation_forLabel() { AlignmentAnnotation ann1 = addAnnotation("label1", "desc1", "calcId1", 1f); @@ -74,7 +74,7 @@ public class SequenceTest return annotation; } - @Test + @Test(groups ={ "Functional" }) public void testGetAlignmentAnnotations_forCalcIdAndLabel() { AlignmentAnnotation ann1 = addAnnotation("label1", "desc1", "calcId1", @@ -107,7 +107,7 @@ public class SequenceTest * setting the sequenceRef on the annotation. Adding the same annotation twice * should be ignored. */ - @Test + @Test(groups ={ "Functional" }) public void testAddAlignmentAnnotation() { assertNull(seq.getAnnotation()); @@ -137,7 +137,7 @@ public class SequenceTest } - @Test + @Test(groups ={ "Functional" }) public void testGetStartGetEnd() { SequenceI seq = new Sequence("test", "ABCDEF"); @@ -157,7 +157,7 @@ public class SequenceTest * Tests for the method that returns an alignment column position (base 1) for * a given sequence position (base 1). */ - @Test + @Test(groups ={ "Functional" }) public void testFindIndex() { SequenceI seq = new Sequence("test", "ABCDEF"); @@ -185,7 +185,7 @@ public class SequenceTest * Tests for the method that returns a dataset sequence position (base 1) for * an aligned column position (base 0). */ - @Test + @Test(groups ={ "Functional" }) public void testFindPosition() { SequenceI seq = new Sequence("test", "ABCDEF"); @@ -220,7 +220,7 @@ public class SequenceTest assertEquals(7, seq.findPosition(11)); } - @Test + @Test(groups ={ "Functional" }) public void testDeleteChars() { SequenceI seq = new Sequence("test", "ABCDEF"); @@ -238,7 +238,7 @@ public class SequenceTest assertEquals(6, seq.getEnd()); } - @Test + @Test(groups ={ "Functional" }) public void testInsertCharAt() { // non-static methods: @@ -255,7 +255,7 @@ public class SequenceTest * Test the method that returns an array of aligned sequence positions where * the array index is the data sequence position (both base 0). */ - @Test + @Test(groups ={ "Functional" }) public void testGapMap() { SequenceI seq = new Sequence("test", "-A--B-CD-E--F-"); @@ -267,7 +267,7 @@ public class SequenceTest * Test the method that gets sequence features, either from the sequence or * its dataset. */ - @Test + @Test(groups ={ "Functional" }) public void testGetSequenceFeatures() { SequenceI seq = new Sequence("test", "GATCAT"); @@ -316,7 +316,7 @@ public class SequenceTest * entries are the residue positions at the sequence position (or to the right * if a gap) */ - @Test + @Test(groups ={ "Functional" }) public void testFindPositionMap() { /* @@ -334,7 +334,7 @@ public class SequenceTest /** * Test for getSubsequence */ - @Test + @Test(groups ={ "Functional" }) public void testGetSubsequence() { SequenceI seq = new Sequence("TestSeq", "ABCDEFG"); @@ -354,7 +354,7 @@ public class SequenceTest /** * Test for deriveSequence applied to a sequence with a dataset */ - @Test + @Test(groups ={ "Functional" }) public void testDeriveSequence_existingDataset() { SequenceI seq = new Sequence("Seq1", "CD"); @@ -369,7 +369,7 @@ public class SequenceTest /** * Test for deriveSequence applied to an ungapped sequence with no dataset */ - @Test + @Test(groups ={ "Functional" }) public void testDeriveSequence_noDatasetUngapped() { SequenceI seq = new Sequence("Seq1", "ABCDEF"); @@ -384,7 +384,7 @@ public class SequenceTest /** * Test for deriveSequence applied to a gapped sequence with no dataset */ - @Test + @Test(groups ={ "Functional" }) public void testDeriveSequence_noDatasetGapped() { SequenceI seq = new Sequence("Seq1", "AB-C.D EF"); diff --git a/test/jalview/datamodel/xdb/embl/EmblFileTest.java b/test/jalview/datamodel/xdb/embl/EmblFileTest.java index 2d9b713..81aae0b 100644 --- a/test/jalview/datamodel/xdb/embl/EmblFileTest.java +++ b/test/jalview/datamodel/xdb/embl/EmblFileTest.java @@ -31,7 +31,7 @@ public class EmblFileTest + "" + "GTGACG"; - @Test + @Test(groups ={ "Functional" }) public void testGetEmblFile() { Vector entries = EmblFile.getEmblFile( diff --git a/test/jalview/ext/jmol/PDBFileWithJmolTest.java b/test/jalview/ext/jmol/PDBFileWithJmolTest.java index 0627217..301c70d 100644 --- a/test/jalview/ext/jmol/PDBFileWithJmolTest.java +++ b/test/jalview/ext/jmol/PDBFileWithJmolTest.java @@ -59,7 +59,7 @@ public class PDBFileWithJmolTest Boolean.TRUE.toString()); } - @Test + @Test(groups ={ "Functional" }) public void testAlignmentLoader() throws Exception { for (String f : testFile) @@ -71,7 +71,7 @@ public class PDBFileWithJmolTest } } - @Test + @Test(groups ={ "Functional" }) public void testFileParser() throws Exception { for (String pdbStr : testFile) diff --git a/test/jalview/ext/paradise/TestAnnotate3D.java b/test/jalview/ext/paradise/TestAnnotate3D.java index d8582af..126c221 100644 --- a/test/jalview/ext/paradise/TestAnnotate3D.java +++ b/test/jalview/ext/paradise/TestAnnotate3D.java @@ -43,7 +43,8 @@ import compbio.util.FileUtil; public class TestAnnotate3D { - @Test(enabled = false) + @Test(groups = + { "Functional" }, enabled = false) public void test1GIDbyId() throws Exception { // use same ID as standard tests given at @@ -53,7 +54,8 @@ public class TestAnnotate3D testRNAMLcontent(ids, null); } - @Test(enabled = false) + @Test(groups = + { "Functional" }, enabled = false) public void testIdVsContent2GIS() throws Exception { Iterator ids = Annotate3D.getRNAMLForPDBId("2GIS"); @@ -97,7 +99,8 @@ public class TestAnnotate3D * * @throws Exception */ - @Test(enabled = false) + @Test(groups = + { "Functional" }, enabled = false) public void testPDBfileVsRNAML() throws Exception { PDBfile pdbf = new PDBfile(true, false, true, "examples/2GIS.pdb", @@ -111,7 +114,8 @@ public class TestAnnotate3D testRNAMLcontent(readers, pdbf); } - @Test(enabled = false) + @Test(groups = + { "Functional" }, enabled = false) private void testRNAMLcontent(Iterator readers, PDBfile pdbf) throws Exception { diff --git a/test/jalview/ext/rbvi/chimera/ChimeraCommandsTest.java b/test/jalview/ext/rbvi/chimera/ChimeraCommandsTest.java index e8b6b19..a3e13e8 100644 --- a/test/jalview/ext/rbvi/chimera/ChimeraCommandsTest.java +++ b/test/jalview/ext/rbvi/chimera/ChimeraCommandsTest.java @@ -13,7 +13,7 @@ import org.testng.annotations.Test; public class ChimeraCommandsTest { - @Test + @Test(groups ={ "Functional" }) public void testAddColourRange() { Map>>> map = new LinkedHashMap>>>(); @@ -67,7 +67,7 @@ public class ChimeraCommandsTest { 5, 9 }, posList.get(0))); } - @Test + @Test(groups ={ "Functional" }) public void testBuildColourCommands() { diff --git a/test/jalview/ext/rbvi/chimera/ChimeraConnect.java b/test/jalview/ext/rbvi/chimera/ChimeraConnect.java index d40a43d..e7f95a0 100644 --- a/test/jalview/ext/rbvi/chimera/ChimeraConnect.java +++ b/test/jalview/ext/rbvi/chimera/ChimeraConnect.java @@ -11,7 +11,7 @@ import ext.edu.ucsf.rbvi.strucviz2.StructureManager; public class ChimeraConnect { - @Test + @Test(groups ={ "Functional" }) public void testLaunchAndExit() { final StructureManager structureManager = new StructureManager(true); diff --git a/test/jalview/ext/rbvi/chimera/JalviewChimeraView.java b/test/jalview/ext/rbvi/chimera/JalviewChimeraView.java index 59a0fdb..44b5d58 100644 --- a/test/jalview/ext/rbvi/chimera/JalviewChimeraView.java +++ b/test/jalview/ext/rbvi/chimera/JalviewChimeraView.java @@ -42,7 +42,7 @@ public class JalviewChimeraView } - @Test + @Test(groups ={ "Functional" }) public void testSingleSeqViewJMol() { String inFile = "examples/1gaq.txt"; @@ -86,7 +86,7 @@ public class JalviewChimeraView } } - @Test + @Test(groups ={ "Functional" }) public void testSingleSeqViewChimera() { String inFile = "examples/1gaq.txt"; diff --git a/test/jalview/gui/AlignViewportTest.java b/test/jalview/gui/AlignViewportTest.java index a6e7ea0..b49352b 100644 --- a/test/jalview/gui/AlignViewportTest.java +++ b/test/jalview/gui/AlignViewportTest.java @@ -32,7 +32,7 @@ public class AlignViewportTest testee = new AlignViewport(al); } - @Test + @Test(groups ={ "Functional" }) public void testCollateForPdb() { /* diff --git a/test/jalview/gui/AnnotationChooserTest.java b/test/jalview/gui/AnnotationChooserTest.java index 3f56985..a7e84b1 100644 --- a/test/jalview/gui/AnnotationChooserTest.java +++ b/test/jalview/gui/AnnotationChooserTest.java @@ -107,7 +107,7 @@ public class AnnotationChooserTest /** * Test creation of panel with OK and Cancel buttons */ - @Test + @Test(groups ={ "Functional" }) public void testBuildActionButtonsPanel() { testee = new AnnotationChooser(parentPanel); @@ -136,7 +136,7 @@ public class AnnotationChooserTest * Test 'Apply to' has 3 radio buttons enabled, 'Selected Sequences' selected, * when there is a current selection group. */ - @Test + @Test(groups ={ "Functional" }) public void testBuildApplyToOptionsPanel_withSelectionGroup() { selectSequences(0, 2, 3); @@ -183,7 +183,7 @@ public class AnnotationChooserTest * Test 'Apply to' has 1 radio button enabled, 'All Sequences' selected, when * there is no current selection group. */ - @Test + @Test(groups ={ "Functional" }) public void testBuildApplyToOptionsPanel_noSelectionGroup() { testee = new AnnotationChooser(parentPanel); @@ -224,7 +224,7 @@ public class AnnotationChooserTest /** * Test Show and Hide radio buttons created, with Hide initially selected. */ - @Test + @Test(groups ={ "Functional" }) public void testBuildShowHidePanel() { testee = new AnnotationChooser(parentPanel); @@ -262,7 +262,7 @@ public class AnnotationChooserTest /** * Test construction of panel containing two sub-panels */ - @Test + @Test(groups ={ "Functional" }) public void testBuildShowHideOptionsPanel() { testee = new AnnotationChooser(parentPanel); @@ -279,7 +279,7 @@ public class AnnotationChooserTest * Test that annotation types are (uniquely) identified. * */ - @Test + @Test(groups ={ "Functional" }) public void testGetAnnotationTypes() { selectSequences(1); @@ -311,7 +311,7 @@ public class AnnotationChooserTest * We expect all annotations of that type to be set hidden. Other annotations * should be left visible. */ - @Test + @Test(groups ={ "Functional" }) public void testSelectType_hideForAll() { selectSequences(1, 2); @@ -347,7 +347,7 @@ public class AnnotationChooserTest * We expect the annotations of that type, linked to the sequence group, to be * set hidden. Other annotations should be left visible. */ - @Test + @Test(groups ={ "Functional" }) public void testSelectType_hideForSelected() { selectSequences(1, 2); @@ -384,7 +384,7 @@ public class AnnotationChooserTest * We expect all annotations of that type to be set visible. Other annotations * should be left unchanged. */ - @Test + @Test(groups ={ "Functional" }) public void testDeselectType_hideForAll() { selectSequences(1, 2); @@ -426,7 +426,7 @@ public class AnnotationChooserTest * We expect the annotations of that type, linked to the sequence group, to be * set visible. Other annotations should be left unchanged. */ - @Test + @Test(groups ={ "Functional" }) public void testDeselectType_hideForSelected() { selectSequences(1, 2); @@ -461,7 +461,7 @@ public class AnnotationChooserTest * We expect all annotations of that type to be set visible. Other annotations * should be left unchanged */ - @Test + @Test(groups ={ "Functional" }) public void testSelectType_showForAll() { selectSequences(1, 2); @@ -500,7 +500,7 @@ public class AnnotationChooserTest * We expect all annotations of that type, linked to the sequence group, to be * set visible. Other annotations should be left unchanged */ - @Test + @Test(groups ={ "Functional" }) public void testSelectType_showForSelected() { // sequences 1 and 2 have annotations IUPred and Jmol @@ -542,7 +542,7 @@ public class AnnotationChooserTest * We expect all annotations of that type to be set hidden. Other annotations * should be left unchanged. */ - @Test + @Test(groups ={ "Functional" }) public void testDeselectType_showForAll() { selectSequences(1, 2); @@ -583,7 +583,7 @@ public class AnnotationChooserTest * We expect the annotations of that type, linked to the sequence group, to be * set hidden. Other annotations should be left unchanged. */ - @Test + @Test(groups ={ "Functional" }) public void testDeselectType_showForSelected() { selectSequences(1, 2); @@ -677,7 +677,7 @@ public class AnnotationChooserTest * Test cases include sequences in the selection group, and others not in the * group. */ - @Test + @Test(groups ={ "Functional" }) public void testIsInActionScope_selectedScope() { // sequences 1 and 2 have annotations 4 and 3 respectively @@ -703,7 +703,7 @@ public class AnnotationChooserTest * Test cases include sequences in the selection group, and others not in the * group. */ - @Test + @Test(groups ={ "Functional" }) public void testIsInActionScope_unselectedScope() { // sequences 1 and 2 have annotations 4 and 3 respectively @@ -727,7 +727,7 @@ public class AnnotationChooserTest /** * Test that the reset method restores previous visibility flags. */ - @Test + @Test(groups ={ "Functional" }) public void testResetOriginalState() { testee = new AnnotationChooser(parentPanel); diff --git a/test/jalview/gui/FontChooserTest.java b/test/jalview/gui/FontChooserTest.java index 646016c..8da11b8 100644 --- a/test/jalview/gui/FontChooserTest.java +++ b/test/jalview/gui/FontChooserTest.java @@ -15,7 +15,7 @@ public class FontChooserTest * available, plain) fonts and point sizes that would be rejected by Jalview's * FontChooser as having an I-width of less than 1.0. */ - @Test + @Test(groups ={ "Functional" }) public void dumpInvalidFonts() { String[] fonts = java.awt.GraphicsEnvironment diff --git a/test/jalview/gui/HelpTest.java b/test/jalview/gui/HelpTest.java index f280797..bb538a5 100644 --- a/test/jalview/gui/HelpTest.java +++ b/test/jalview/gui/HelpTest.java @@ -14,7 +14,7 @@ import org.testng.annotations.Test; public class HelpTest { - @Test + @Test(groups ={ "Functional" }) public void checkHelpTargets() throws HelpSetException { ClassLoader cl = Desktop.class.getClassLoader(); diff --git a/test/jalview/gui/JAL1353bugdemo.java b/test/jalview/gui/JAL1353bugdemo.java index 4a17622..868e19e 100644 --- a/test/jalview/gui/JAL1353bugdemo.java +++ b/test/jalview/gui/JAL1353bugdemo.java @@ -54,7 +54,8 @@ public class JAL1353bugdemo volatile boolean finish = false; - @Test(enabled = false) + @Test(groups = + { "Functional" }, enabled = false) public void test() { Cache.initLogger(); diff --git a/test/jalview/gui/JvSwingUtilsTest.java b/test/jalview/gui/JvSwingUtilsTest.java index 1a16053..8a6f63b 100644 --- a/test/jalview/gui/JvSwingUtilsTest.java +++ b/test/jalview/gui/JvSwingUtilsTest.java @@ -9,7 +9,7 @@ import org.testng.annotations.Test; public class JvSwingUtilsTest { - @Test + @Test(groups ={ "Functional" }) public void testGetScrollBarProportion() { /* @@ -24,7 +24,7 @@ public class JvSwingUtilsTest assertEquals(0.25f, JvSwingUtils.getScrollBarProportion(sb), 0.001f); } - @Test + @Test(groups ={ "Functional" }) public void testGetScrollValueForProportion() { /* diff --git a/test/jalview/gui/PDBSearchPanelTest.java b/test/jalview/gui/PDBSearchPanelTest.java index 3a1c554..514fd7a 100644 --- a/test/jalview/gui/PDBSearchPanelTest.java +++ b/test/jalview/gui/PDBSearchPanelTest.java @@ -23,7 +23,7 @@ public class PDBSearchPanelTest { } - @Test + @Test(groups ={ "Functional" }) public void populateCmbSearchTargetOptionsTest() { PDBSearchPanel searchPanel = new PDBSearchPanel(null); @@ -31,7 +31,7 @@ public class PDBSearchPanelTest searchPanel.populateCmbSearchTargetOptions(); } - @Test + @Test(groups ={ "Functional" }) public void testDecodeSearchTerm() { String expectedString = "1xyz OR text:2xyz OR text:3xyz"; @@ -46,7 +46,7 @@ public class PDBSearchPanelTest assertEquals(expectedString, outcome); } - @Test + @Test(groups ={ "Functional" }) public void testgetPDBIdwithSpecifiedChain() { @@ -68,7 +68,8 @@ public class PDBSearchPanelTest assertEquals(expectedString, outcome); } - @Test + @Test(groups = + { "Network" }, timeOut = 5000) public void txt_search_ActionPerformedTest() { PDBSearchPanel searchPanel = new PDBSearchPanel(null); diff --git a/test/jalview/gui/PaintRefresherTest.java b/test/jalview/gui/PaintRefresherTest.java index adbf385..6916cef 100644 --- a/test/jalview/gui/PaintRefresherTest.java +++ b/test/jalview/gui/PaintRefresherTest.java @@ -34,7 +34,7 @@ public class PaintRefresherTest PaintRefresher.components.clear(); } - @Test + @Test(groups ={ "Functional" }) public void testRegister() { JPanel jp = new JPanel(); @@ -60,7 +60,7 @@ public class PaintRefresherTest assertTrue(registered.get("44").contains(jp4)); } - @Test + @Test(groups ={ "Functional" }) public void testRemoveComponent() { Map> registered = PaintRefresher.components; @@ -92,7 +92,7 @@ public class PaintRefresherTest assertTrue(registered.get("22").contains(jp2)); } - @Test + @Test(groups ={ "Functional" }) public void testGetAssociatedPanels() { SequenceI [] seqs = new SequenceI[]{new Sequence("", "ABC")}; diff --git a/test/jalview/gui/PopupMenuTest.java b/test/jalview/gui/PopupMenuTest.java index ba1b275..f984dfc 100644 --- a/test/jalview/gui/PopupMenuTest.java +++ b/test/jalview/gui/PopupMenuTest.java @@ -60,7 +60,7 @@ public class PopupMenuTest } } - @Test + @Test(groups ={ "Functional" }) public void testConfigureReferenceAnnotationsMenu_noSequenceSelected() { JMenuItem menu = new JMenuItem(); @@ -78,7 +78,7 @@ public class PopupMenuTest * are no reference annotations to add to the alignment. The menu item should * be disabled. */ - @Test + @Test(groups ={ "Functional" }) public void testConfigureReferenceAnnotationsMenu_noReferenceAnnotations() { JMenuItem menu = new JMenuItem(); @@ -99,7 +99,7 @@ public class PopupMenuTest * reference annotations are already on the alignment. The menu item should be * disabled. */ - @Test + @Test(groups ={ "Functional" }) public void testConfigureReferenceAnnotationsMenu_alreadyAdded() { JMenuItem menu = new JMenuItem(); @@ -119,7 +119,7 @@ public class PopupMenuTest * The menu item should be enabled, and acquire a tooltip which lists the * annotation sources (calcIds) and type (labels). */ - @Test + @Test(groups ={ "Functional" }) public void testConfigureReferenceAnnotationsMenu() { JMenuItem menu = new JMenuItem(); @@ -140,7 +140,7 @@ public class PopupMenuTest * on the alignment. The menu item should be enabled, and acquire a tooltip * which lists the annotation sources (calcIds) and type (labels). */ - @Test + @Test(groups ={ "Functional" }) public void testConfigureReferenceAnnotationsMenu_notOnAlignment() { JMenuItem menu = new JMenuItem(); @@ -219,7 +219,7 @@ public class PopupMenuTest * The menu item should be enabled, and acquire a tooltip which lists the * annotation sources (calcIds) and type (labels). */ - @Test + @Test(groups ={ "Functional" }) public void testConfigureReferenceAnnotationsMenu_twoViews() { } @@ -228,7 +228,7 @@ public class PopupMenuTest * Test for building menu options including 'show' and 'hide' annotation * types. */ - @Test + @Test(groups ={ "Functional" }) public void testBuildAnnotationTypesMenus() { JMenu showMenu = new JMenu(); @@ -310,7 +310,7 @@ public class PopupMenuTest /** * Test for building menu options with only 'hide' annotation types enabled. */ - @Test + @Test(groups ={ "Functional" }) public void testBuildAnnotationTypesMenus_showDisabled() { JMenu showMenu = new JMenu(); @@ -369,7 +369,7 @@ public class PopupMenuTest /** * Test for building menu options with only 'show' annotation types enabled. */ - @Test + @Test(groups ={ "Functional" }) public void testBuildAnnotationTypesMenus_hideDisabled() { JMenu showMenu = new JMenu(); diff --git a/test/jalview/gui/ProgressBarTest.java b/test/jalview/gui/ProgressBarTest.java index 281ed2d..e50148c 100644 --- a/test/jalview/gui/ProgressBarTest.java +++ b/test/jalview/gui/ProgressBarTest.java @@ -20,7 +20,7 @@ public class ProgressBarTest private JLabel statusBar; - @Test + @Test(groups ={ "Functional" }) public void testConstructor_prematureInstantiation() { try @@ -33,7 +33,7 @@ public class ProgressBarTest } } - @Test + @Test(groups ={ "Functional" }) public void testConstructor_wrongLayout() { statusPanel = new JPanel(); @@ -48,7 +48,7 @@ public class ProgressBarTest } } - @Test + @Test(groups ={ "Functional" }) public void testSetProgressBar() { statusPanel = new JPanel(); diff --git a/test/jalview/gui/SequenceRendererTest.java b/test/jalview/gui/SequenceRendererTest.java index 64d15b8..0f3d4f6 100644 --- a/test/jalview/gui/SequenceRendererTest.java +++ b/test/jalview/gui/SequenceRendererTest.java @@ -15,7 +15,7 @@ import org.testng.annotations.Test; public class SequenceRendererTest { - @Test + @Test(groups ={ "Functional" }) public void testGetResidueBoxColour_zappo() { SequenceI seq = new Sequence("name", "MATVLGSPRAPAFF"); // FER1_MAIZE... diff --git a/test/jalview/gui/StructureChooserTest.java b/test/jalview/gui/StructureChooserTest.java index 44b51f2..2baee84 100644 --- a/test/jalview/gui/StructureChooserTest.java +++ b/test/jalview/gui/StructureChooserTest.java @@ -48,7 +48,7 @@ public class StructureChooserTest - @Test + @Test(groups ={ "Functional" }) public void buildQueryTest() { String query = StructureChooser.buildQuery(seq); @@ -58,7 +58,7 @@ public class StructureChooserTest query); } - @Test + @Test(groups ={ "Functional" }) public void populateFilterComboBoxTest() { SequenceI[] selectedSeqs = new SequenceI[] @@ -77,7 +77,7 @@ public class StructureChooserTest // should be populated } - @Test + @Test(groups ={ "Functional" }) public void fetchStructuresInfoTest() { SequenceI[] selectedSeqs = new SequenceI[] diff --git a/test/jalview/io/AnnotatedPDBFileInputTest.java b/test/jalview/io/AnnotatedPDBFileInputTest.java index 1c6a489..feba9cb 100644 --- a/test/jalview/io/AnnotatedPDBFileInputTest.java +++ b/test/jalview/io/AnnotatedPDBFileInputTest.java @@ -47,7 +47,7 @@ public class AnnotatedPDBFileInputTest .get(0).getId(); } - @Test + @Test(groups ={ "Functional" }) public void checkNoDuplicates() { // not strictly a requirement, but strange things may happen if multiple @@ -67,7 +67,7 @@ public class AnnotatedPDBFileInputTest } } - @Test + @Test(groups ={ "Functional" }) public void checkPDBannotationSource() { @@ -85,7 +85,7 @@ public class AnnotatedPDBFileInputTest /** * Check sequence features have been added */ - @Test + @Test(groups ={ "Functional" }) public void checkPDBSequenceFeatures() { StructureSelectionManager ssm = StructureSelectionManager @@ -124,7 +124,7 @@ public class AnnotatedPDBFileInputTest assertEquals("TYR:314 1gaqC", sf[295].getDescription()); } - @Test + @Test(groups ={ "Functional" }) public void checkAnnotationWiring() { assertTrue(al.getAlignmentAnnotation() != null); @@ -173,7 +173,7 @@ public class AnnotatedPDBFileInputTest } - @Test + @Test(groups ={ "Functional" }) public void testJalviewProjectRelocationAnnotation() throws Exception { diff --git a/test/jalview/io/AnnotationFileIOTest.java b/test/jalview/io/AnnotationFileIOTest.java index d36a82b..a63923a 100644 --- a/test/jalview/io/AnnotationFileIOTest.java +++ b/test/jalview/io/AnnotationFileIOTest.java @@ -52,7 +52,7 @@ public class AnnotationFileIOTest { "Test hiding/showing of insertions on sequence_ref", "examples/uniref50.fa", "examples/testdata/uniref50_seqref.jva" } }; - @Test + @Test(groups ={ "Functional" }) public void exampleAnnotationFileIO() throws Exception { for (String[] testPair : TestFiles) @@ -100,7 +100,7 @@ public class AnnotationFileIOTest * f */ - // @Test + // @Test(groups ={ "Functional" }) public static void testAnnotationFileIO(String testname, File f, File annotFile) { diff --git a/test/jalview/io/BioJsHTMLOutputTest.java b/test/jalview/io/BioJsHTMLOutputTest.java index 8440b6d..27c8a0e 100644 --- a/test/jalview/io/BioJsHTMLOutputTest.java +++ b/test/jalview/io/BioJsHTMLOutputTest.java @@ -19,7 +19,7 @@ import org.testng.annotations.Test; public class BioJsHTMLOutputTest { - @Test + @Test(groups ={ "Functional" }) public void getJalviewAlignmentAsJsonString() { String bjsTemplate = null; @@ -44,7 +44,8 @@ public class BioJsHTMLOutputTest Assert.assertNotNull(bjsTemplate); } - @Test(expectedExceptions = NullPointerException.class) + @Test(groups = + { "Functional" }, expectedExceptions = NullPointerException.class) public void expectedNullPointerException() { try @@ -57,7 +58,7 @@ public class BioJsHTMLOutputTest } } - @Test + @Test(groups ={ "Functional" }) public void getBioJsMSAVersions() { TreeMap versions = null; @@ -89,7 +90,8 @@ public class BioJsHTMLOutputTest } - @Test + @Test(groups = + { "Network" }) public void testBioJsUpdate() { String url = BioJsHTMLOutput.BJS_TEMPLATE_GIT_REPO; diff --git a/test/jalview/io/FileIOTester.java b/test/jalview/io/FileIOTester.java index 6b7de77..0d66b21 100644 --- a/test/jalview/io/FileIOTester.java +++ b/test/jalview/io/FileIOTester.java @@ -73,7 +73,7 @@ public class FileIOTester + "' identified as '" + type + "'", type.equalsIgnoreCase(fmt)); } - @Test + @Test(groups ={ "Functional" }) public void testStarsInFasta1() throws IOException { String uri; @@ -82,7 +82,7 @@ public class FileIOTester assertValidFormat("FASTA", uri, fp); } - @Test + @Test(groups ={ "Functional" }) public void testStarsInFasta2() throws IOException { String uri; @@ -91,7 +91,7 @@ public class FileIOTester assertValidFormat("FASTA", uri, fp); } - @Test + @Test(groups ={ "Functional" }) public void testGzipIo() throws IOException { String uri; @@ -100,7 +100,7 @@ public class FileIOTester assertValidFormat("FASTA", uri, fp); } - @Test + @Test(groups ={ "Functional" }) public void testGziplocalFileIO() throws IOException { String filepath; @@ -109,7 +109,7 @@ public class FileIOTester assertValidFormat("FASTA", filepath, fp); } - @Test + @Test(groups ={ "Functional" }) public void testNonGzipURLIO() throws IOException { String uri; @@ -118,7 +118,7 @@ public class FileIOTester assertValidFormat("FASTA", uri, fp); } - @Test + @Test(groups ={ "Functional" }) public void testNonGziplocalFileIO() throws IOException { String filepath; diff --git a/test/jalview/io/Gff3tests.java b/test/jalview/io/Gff3tests.java index 8df44df..c8cf638 100644 --- a/test/jalview/io/Gff3tests.java +++ b/test/jalview/io/Gff3tests.java @@ -1,5 +1,11 @@ package jalview.io; +import static org.testng.AssertJUnit.assertEquals; +import static org.testng.AssertJUnit.assertFalse; +import static org.testng.AssertJUnit.assertNotNull; +import static org.testng.AssertJUnit.assertNull; +import static org.testng.AssertJUnit.assertTrue; + import jalview.datamodel.Alignment; import jalview.datamodel.AlignmentI; import jalview.datamodel.SequenceDummy; @@ -8,8 +14,7 @@ import jalview.gui.AlignFrame; import java.io.IOException; -import org.junit.Assert; -import org.junit.Test; +import org.testng.annotations.Test; public class Gff3tests { @@ -18,7 +23,7 @@ public class Gff3tests exonerateOutput = "examples/testdata/exonerateoutput.gff", simpleGff3file = "examples/testdata/simpleGff3.gff"; - @Test + @Test(groups ={ "Functional" }) public void testExonerateImport() { // exonerate does not tag sequences after features, so we have a more @@ -29,26 +34,26 @@ public class Gff3tests AlignFrame af = loader.LoadFileWaitTillLoaded(exonerateSeqs, FormatAdapter.FILE); - Assert.assertEquals("Unexpected number of DNA protein associations", 0, + assertEquals("Unexpected number of DNA protein associations", 0, af.getViewport().getAlignment().getCodonFrames().size()); af.loadJalviewDataFile(exonerateOutput, FormatAdapter.FILE, null, null); - Assert.assertNotEquals("Expected at least one DNA protein association", - 0, af.getViewport().getAlignment().getDataset() - .getCodonFrames().size()); + assertTrue("Expected at least one DNA protein association", af + .getViewport().getAlignment().getDataset().getCodonFrames() + .size() > 0); } - @Test + @Test(groups ={ "Functional" }) public void simpleGff3FileIdentify() { - Assert.assertEquals("Didn't recognise file correctly.", + assertEquals("Didn't recognise file correctly.", IdentifyFile.GFF3File, new IdentifyFile().Identify(simpleGff3file, FormatAdapter.FILE)); } - @Test + @Test(groups ={ "Functional" }) public void simpleGff3FileClass() throws IOException { AlignmentI dataset = new Alignment(new SequenceI[] @@ -57,22 +62,22 @@ public class Gff3tests FormatAdapter.FILE); boolean parseResult = ffile.parse(dataset, null, null, false, false); - Assert.assertTrue("return result should be true", parseResult); + assertTrue("return result should be true", parseResult); checkDatasetfromSimpleGff3(dataset); } - @Test + @Test(groups ={ "Functional" }) public void simpleGff3FileLoader() throws IOException { AlignFrame af = new FileLoader(false).LoadFileWaitTillLoaded( simpleGff3file, FormatAdapter.FILE); - Assert.assertTrue( + assertTrue( "Didn't read the alignment into an alignframe from Gff3 File", af != null); checkDatasetfromSimpleGff3(af.getViewport().getAlignment().getDataset()); } - @Test + @Test(groups ={ "Functional" }) public void simpleGff3RelaxedIdMatching() throws IOException { AlignmentI dataset = new Alignment(new SequenceI[] @@ -81,12 +86,12 @@ public class Gff3tests FormatAdapter.FILE); boolean parseResult = ffile.parse(dataset, null, null, false, true); - Assert.assertTrue("return result (relaxedID matching) should be true", + assertTrue("return result (relaxedID matching) should be true", parseResult); checkDatasetfromSimpleGff3(dataset); } - @Test + @Test(groups ={ "Functional" }) public void readGff3File() throws IOException { Gff3File gff3reader = new Gff3File(simpleGff3file, FormatAdapter.FILE); @@ -98,47 +103,50 @@ public class Gff3tests private void checkDatasetfromSimpleGff3(AlignmentI dataset) { - Assert.assertEquals("no sequences extracted from GFF3 file", 2, + assertEquals("no sequences extracted from GFF3 file", 2, dataset.getHeight()); SequenceI seq1 = dataset.findName("seq1"), seq2 = dataset .findName("seq2"); - Assert.assertNotNull(seq1); - Assert.assertNotNull(seq2); - Assert.assertFalse( + assertNotNull(seq1); + assertNotNull(seq2); + assertFalse( "Failed to replace dummy seq1 with real sequence", seq1 instanceof SequenceDummy && ((SequenceDummy) seq1).isDummy()); - Assert.assertFalse( + assertFalse( "Failed to replace dummy seq2 with real sequence", seq2 instanceof SequenceDummy && ((SequenceDummy) seq2).isDummy()); String placeholderseq = new SequenceDummy("foo").getSequenceAsString(); - Assert.assertFalse("dummy replacement buggy for seq1", + assertFalse("dummy replacement buggy for seq1", placeholderseq.equals(seq1.getSequenceAsString())); - Assert.assertNotEquals("dummy replacement buggy for seq2", + assertFalse("dummy replacement buggy for seq2", placeholderseq.equals(seq2.getSequenceAsString())); - Assert.assertNotNull("No features added to seq1", + assertNotNull("No features added to seq1", seq1.getSequenceFeatures());// != null); - Assert.assertEquals("Wrong number of features", 3, + assertEquals("Wrong number of features", 3, seq1.getSequenceFeatures().length); - Assert.assertNull(seq2.getSequenceFeatures()); - Assert.assertEquals("Wrong number of features", 0, seq2 + assertNull(seq2.getSequenceFeatures()); + assertEquals( + "Wrong number of features", + 0, + seq2 .getSequenceFeatures() == null ? 0 : seq2.getSequenceFeatures().length); - Assert.assertTrue( + assertTrue( "Expected at least one CDNA/Protein mapping for seq1", dataset.getCodonFrame(seq1) != null && dataset.getCodonFrame(seq1).size() > 0); } - // @Test + // @Test(groups ={ "Functional" }) // public final void testPrintGFFFormatSequenceIArrayMapOfStringObject() // { // fail("Not yet implemented"); // } // - // @Test + // @Test(groups ={ "Functional" }) // public final void testAlignFileBooleanStringString() // { // fail("Not yet implemented"); diff --git a/test/jalview/io/HtmlFileTest.java b/test/jalview/io/HtmlFileTest.java index eca3984..10d1057 100644 --- a/test/jalview/io/HtmlFileTest.java +++ b/test/jalview/io/HtmlFileTest.java @@ -7,7 +7,8 @@ import org.testng.annotations.Test; public class HtmlFileTest { - @Test(enabled = false) + @Test(groups = + { "Functional" }, enabled = false) public void test() { fail("Not yet implemented"); diff --git a/test/jalview/io/JSONFileTest.java b/test/jalview/io/JSONFileTest.java index a695d37..108dd31 100644 --- a/test/jalview/io/JSONFileTest.java +++ b/test/jalview/io/JSONFileTest.java @@ -246,13 +246,13 @@ public class JSONFileTest jf = null; } - @Test + @Test(groups ={ "Functional" }) public void roundTripTest() { assertNotNull("JSON roundtrip test failed!", testJsonFile); } - @Test + @Test(groups ={ "Functional" }) public void testSeqParsed() { assertNotNull("Couldn't read supplied alignment data.", testAlignment); @@ -269,7 +269,7 @@ public class JSONFileTest TEST_SEQ_HEIGHT, passedCount); } - @Test + @Test(groups ={ "Functional" }) public void hiddenColsTest() { ColumnSelection cs = testJsonFile.getColumnSelection(); @@ -281,7 +281,7 @@ public class JSONFileTest "Mismatched hidden columns!"); } - @Test + @Test(groups ={ "Functional" }) public void hiddenSeqsTest() { Assert.assertNotNull(testJsonFile.getHiddenSequences(), @@ -290,7 +290,7 @@ public class JSONFileTest "Hidden sequece"); } - @Test + @Test(groups ={ "Functional" }) public void colorSchemeTest() { Assert.assertNotNull(testJsonFile.getColourScheme(), @@ -300,14 +300,14 @@ public class JSONFileTest "Zappo colour scheme expected!"); } - @Test + @Test(groups ={ "Functional" }) public void isShowSeqFeaturesSet() { Assert.assertTrue(testJsonFile.isShowSeqFeatures(), "Sequence feature isDisplayed setting expected to be true"); } - @Test + @Test(groups ={ "Functional" }) public void testGrpParsed() { Assert.assertNotNull(testAlignment.getGroups()); @@ -323,7 +323,7 @@ public class JSONFileTest TEST_GRP_HEIGHT, passedCount); } - @Test + @Test(groups ={ "Functional" }) public void testAnnotationParsed() { Assert.assertNotNull(testAlignment.getAlignmentAnnotation()); diff --git a/test/jalview/io/Jalview2xmlTests.java b/test/jalview/io/Jalview2xmlTests.java index 7d24727..c03dd71 100644 --- a/test/jalview/io/Jalview2xmlTests.java +++ b/test/jalview/io/Jalview2xmlTests.java @@ -83,7 +83,7 @@ public class Jalview2xmlTests return numdsann; } - @Test + @Test(groups ={ "Functional" }) public void testRNAStructureRecovery() throws Exception { String inFile = "examples/RF00031_folded.stk"; @@ -118,7 +118,7 @@ public class Jalview2xmlTests af.getViewport().getGlobalColourScheme() instanceof jalview.schemes.RNAHelicesColour); } - @Test + @Test(groups ={ "Functional" }) public void testTCoffeeScores() throws Exception { String inFile = "examples/uniref50.fa", inAnnot = "examples/uniref50.score_ascii"; @@ -154,7 +154,7 @@ public class Jalview2xmlTests .println("T-Coffee score shading successfully recovered from project."); } - @Test + @Test(groups ={ "Functional" }) public void testColourByAnnotScores() throws Exception { String inFile = "examples/uniref50.fa", inAnnot = "examples/testdata/uniref50_iupred.jva"; @@ -240,7 +240,7 @@ public class Jalview2xmlTests .println("Per sequence (Group) colourscheme successfully applied and recovered."); } - @Test + @Test(groups ={ "Functional" }) public void gatherViewsHere() throws Exception { int origCount = Desktop.getAlignFrames() == null ? 0 : Desktop @@ -253,7 +253,7 @@ public class Jalview2xmlTests } - @Test + @Test(groups ={ "Functional" }) public void viewRefPdbAnnotation() throws Exception { Cache.applicationProperties.setProperty("STRUCT_FROM_PDB", @@ -315,7 +315,7 @@ public class Jalview2xmlTests } - @Test + @Test(groups ={ "Functional" }) public void testCopyViewSettings() throws Exception { AlignFrame af = new jalview.io.FileLoader().LoadFileWaitTillLoaded( diff --git a/test/jalview/io/NewickFileTests.java b/test/jalview/io/NewickFileTests.java index a016134..a783b1e 100644 --- a/test/jalview/io/NewickFileTests.java +++ b/test/jalview/io/NewickFileTests.java @@ -89,7 +89,7 @@ public class NewickFileTests { } - @Test + @Test(groups ={ "Functional" }) public void testTreeIO() throws Exception { String stage = "Init", treename = " '" + name + "' :"; diff --git a/test/jalview/io/PhylipFileTests.java b/test/jalview/io/PhylipFileTests.java index d335731..9c95486 100644 --- a/test/jalview/io/PhylipFileTests.java +++ b/test/jalview/io/PhylipFileTests.java @@ -79,7 +79,7 @@ public class PhylipFileTests * * @throws Exception */ - @Test + @Test(groups ={ "Functional" }) public void testSequentialDataExtraction() throws Exception { testDataExtraction(sequentialFile); @@ -91,7 +91,7 @@ public class PhylipFileTests * * @throws Exception */ - @Test + @Test(groups ={ "Functional" }) public void testInterleavedDataExtraction() throws Exception { testDataExtraction(interleavedFile); @@ -124,7 +124,7 @@ public class PhylipFileTests * * @throws Exception */ - @Test + @Test(groups ={ "Functional" }) public void testSequentialIO() throws Exception { testIO(sequentialFile); @@ -136,7 +136,7 @@ public class PhylipFileTests * * @throws Exception */ - @Test + @Test(groups ={ "Functional" }) public void testInterleavedIO() throws Exception { testIO(interleavedFile); diff --git a/test/jalview/io/RNAMLfileTest.java b/test/jalview/io/RNAMLfileTest.java index d684512..d9d0b7f 100644 --- a/test/jalview/io/RNAMLfileTest.java +++ b/test/jalview/io/RNAMLfileTest.java @@ -39,7 +39,7 @@ public class RNAMLfileTest { } - @Test + @Test(groups ={ "Functional" }) public void testRnamlToStockholmIO() { StockholmFileTest.testFileIOwithFormat(new File( diff --git a/test/jalview/io/StockholmFileTest.java b/test/jalview/io/StockholmFileTest.java index 45de531..2537002 100644 --- a/test/jalview/io/StockholmFileTest.java +++ b/test/jalview/io/StockholmFileTest.java @@ -43,13 +43,13 @@ public class StockholmFileTest static String PfamFile = "examples/PF00111_seed.stk", RfamFile = "examples/RF00031_folded.stk"; - @Test + @Test(groups ={ "Functional" }) public void pfamFileIO() throws Exception { testFileIOwithFormat(new File(PfamFile), "STH", -1, 0); } - @Test + @Test(groups ={ "Functional" }) public void pfamFileDataExtraction() throws Exception { AppletFormatAdapter af = new AppletFormatAdapter(); @@ -68,7 +68,7 @@ public class StockholmFileTest numpdb > 0); } - @Test + @Test(groups ={ "Functional" }) public void rfamFileIO() throws Exception { testFileIOwithFormat(new File(RfamFile), "STH", 2, 1); diff --git a/test/jalview/io/TCoffeeScoreFileTest.java b/test/jalview/io/TCoffeeScoreFileTest.java index b7da5e4..7911188 100644 --- a/test/jalview/io/TCoffeeScoreFileTest.java +++ b/test/jalview/io/TCoffeeScoreFileTest.java @@ -40,7 +40,7 @@ public class TCoffeeScoreFileTest final static File ALIGN_FILE = new File( "test/jalview/io/tcoffee.fasta_aln"); - @Test + @Test(groups ={ "Functional" }) public void testReadHeader() throws IOException { @@ -65,7 +65,7 @@ public class TCoffeeScoreFileTest AssertJUnit.assertEquals(90, header.getScoreFor("cons")); } - @Test + @Test(groups ={ "Functional" }) public void testWrongFile() { try @@ -80,7 +80,7 @@ public class TCoffeeScoreFileTest } } - @Test + @Test(groups ={ "Functional" }) public void testHeightAndWidth() throws IOException { TCoffeeScoreFile result = new TCoffeeScoreFile(SCORE_FILE.getPath(), @@ -90,7 +90,7 @@ public class TCoffeeScoreFileTest AssertJUnit.assertEquals(83, result.getWidth()); } - @Test + @Test(groups ={ "Functional" }) public void testReadBlock() throws IOException { @@ -129,7 +129,7 @@ public class TCoffeeScoreFileTest block.getConsensus()); } - @Test + @Test(groups ={ "Functional" }) public void testParse() throws IOException { @@ -165,7 +165,7 @@ public class TCoffeeScoreFileTest parser.getScoresFor("cons")); } - @Test + @Test(groups ={ "Functional" }) public void testGetAsList() throws IOException { @@ -203,7 +203,7 @@ public class TCoffeeScoreFileTest } - @Test + @Test(groups ={ "Functional" }) public void testGetAsArray() throws IOException { @@ -234,7 +234,7 @@ public class TCoffeeScoreFileTest } - @Test + @Test(groups ={ "Functional" }) public void testHeightAndWidthWithResidueNumbers() throws Exception { String file = "test/jalview/io/tcoffee.score_ascii_with_residue_numbers"; diff --git a/test/jalview/schemes/DnaCodonTests.java b/test/jalview/schemes/DnaCodonTests.java index 75877ee..3d20190 100644 --- a/test/jalview/schemes/DnaCodonTests.java +++ b/test/jalview/schemes/DnaCodonTests.java @@ -29,13 +29,13 @@ import org.testng.annotations.Test; public class DnaCodonTests { - @Test + @Test(groups ={ "Functional" }) public void testAmbiguityCodeGeneration() { assertTrue(ResidueProperties.ambiguityCodes.size() > 0); } - @Test + @Test(groups ={ "Functional" }) public void testAmbiguityCodon() { for (String ac : ResidueProperties.ambiguityCodes.keySet()) @@ -45,7 +45,7 @@ public class DnaCodonTests } } - @Test + @Test(groups ={ "Functional" }) public void regenerateCodonTable() { for (Map.Entry codon : ResidueProperties.codonHash2 @@ -56,7 +56,7 @@ public class DnaCodonTests } } - @Test + @Test(groups ={ "Functional" }) public void checkOldCodonagainstNewCodonTable() { // note - this test will be removed once the old codon table (including diff --git a/test/jalview/schemes/ResiduePropertiesTest.java b/test/jalview/schemes/ResiduePropertiesTest.java index d7e0e0b..eb2ad45 100644 --- a/test/jalview/schemes/ResiduePropertiesTest.java +++ b/test/jalview/schemes/ResiduePropertiesTest.java @@ -14,7 +14,7 @@ public class ResiduePropertiesTest /** * Test 'standard' codon translations (no ambiguity codes) */ - @Test + @Test(groups ={ "Functional" }) public void testCodonTranslate() { // standard translation table order column 1/2/3/4 @@ -88,7 +88,7 @@ public class ResiduePropertiesTest * Test a sample of codon translations involving ambiguity codes. Should * return a protein value where the ambiguity does not affect the translation. */ - @Test + @Test(groups ={ "Functional" }) public void testCodonTranslate_ambiguityCodes() { // Y is C or T @@ -175,7 +175,7 @@ public class ResiduePropertiesTest assertNull(ResidueProperties.codonTranslate("WSK")); } - @Test + @Test(groups ={ "Functional" }) public void testGetResidues_nucleotide() { /* @@ -194,7 +194,7 @@ public class ResiduePropertiesTest assertEquals("[A, C, G, I, N, R, T, U, X, Y]", residues.toString()); } - @Test + @Test(groups ={ "Functional" }) public void testGetResidues_peptide() { /* diff --git a/test/jalview/schemes/ScoreMatrixPrinter.java b/test/jalview/schemes/ScoreMatrixPrinter.java index 0b15b60..f00ac8d 100644 --- a/test/jalview/schemes/ScoreMatrixPrinter.java +++ b/test/jalview/schemes/ScoreMatrixPrinter.java @@ -28,7 +28,7 @@ import org.testng.annotations.Test; public class ScoreMatrixPrinter { - @Test + @Test(groups ={ "Functional" }) public void printAllMatrices() { for (Map.Entry sm : ResidueProperties.scoreMatrices @@ -39,7 +39,7 @@ public class ScoreMatrixPrinter } } - @Test + @Test(groups ={ "Functional" }) public void printHTMLMatrices() { for (Map.Entry _sm : ResidueProperties.scoreMatrices diff --git a/test/jalview/structure/Mapping.java b/test/jalview/structure/Mapping.java index db0ea49..c057980 100644 --- a/test/jalview/structure/Mapping.java +++ b/test/jalview/structure/Mapping.java @@ -27,7 +27,8 @@ public class Mapping * 115 in PDB Res Numbering secondary structure numbers in jmol seem to be in * msd numbering, not pdb res numbering. */ - @Test(enabled = false) + @Test(groups = + { "Functional" }, enabled = false) public void pdbEntryPositionMap() throws Exception { Assert.fail("This test intentionally left to fail"); @@ -109,7 +110,8 @@ public class Mapping } } - @Test(enabled = false) + @Test(groups = + { "Functional" }, enabled = false) public void testPDBentryMapping() throws Exception { Assert.fail("This test intentionally left to fail"); @@ -210,7 +212,7 @@ public class Mapping * transform * */ - @Test + @Test(groups ={ "Functional" }) public void mapFer1From3W5V() throws Exception { AlignFrame seqf = new FileLoader(false) @@ -233,7 +235,7 @@ public class Mapping * compare reference annotation for imported pdb sequence to identical * seuqence with transferred annotation from mapped pdb file */ - @Test + @Test(groups ={ "Functional" }) public void compareTransferredToRefPDBAnnot() throws Exception { AlignFrame ref = new FileLoader(false) diff --git a/test/jalview/structure/StructureSelectionManagerTest.java b/test/jalview/structure/StructureSelectionManagerTest.java index 589adde..1e4a866 100644 --- a/test/jalview/structure/StructureSelectionManagerTest.java +++ b/test/jalview/structure/StructureSelectionManagerTest.java @@ -21,7 +21,7 @@ public class StructureSelectionManagerTest ssm = new StructureSelectionManager(); } - @Test + @Test(groups ={ "Functional" }) public void testAddMapping() { AlignedCodonFrame acf1 = new AlignedCodonFrame(); @@ -59,7 +59,7 @@ public class StructureSelectionManagerTest assertEquals(1, ssm.seqMappingRefCounts.get(acf2).intValue()); } - @Test + @Test(groups ={ "Functional" }) public void testAddMappings() { AlignedCodonFrame acf1 = new AlignedCodonFrame(); @@ -89,7 +89,7 @@ public class StructureSelectionManagerTest assertEquals(1, ssm.seqMappingRefCounts.get(acf3).intValue()); } - @Test + @Test(groups ={ "Functional" }) public void testRemoveMapping() { AlignedCodonFrame acf1 = new AlignedCodonFrame(); @@ -127,7 +127,7 @@ public class StructureSelectionManagerTest assertEquals(0, ssm.seqMappingRefCounts.size()); } - @Test + @Test(groups ={ "Functional" }) public void testRemoveMappings() { AlignedCodonFrame acf1 = new AlignedCodonFrame(); diff --git a/test/jalview/structures/models/AAStructureBindingModelTest.java b/test/jalview/structures/models/AAStructureBindingModelTest.java index 7871e77..c5d1db9 100644 --- a/test/jalview/structures/models/AAStructureBindingModelTest.java +++ b/test/jalview/structures/models/AAStructureBindingModelTest.java @@ -119,7 +119,7 @@ public class AAStructureBindingModelTest * Verify that the method determines that columns 2, 5 and 6 of the aligment * are alignable in structure */ - @Test + @Test(groups ={ "Functional" }) public void testFindSuperposableResidues() { SuperposeData[] structs = new SuperposeData[al.getHeight()]; @@ -150,7 +150,7 @@ public class AAStructureBindingModelTest assertTrue(matched[5]); } - @Test + @Test(groups ={ "Functional" }) public void testFindSuperposableResidues_hiddenColumn() { SuperposeData[] structs = new SuperposeData[al.getHeight()]; diff --git a/test/jalview/util/ColorUtilsTest.java b/test/jalview/util/ColorUtilsTest.java index ad6e6d0..6d8dded 100644 --- a/test/jalview/util/ColorUtilsTest.java +++ b/test/jalview/util/ColorUtilsTest.java @@ -16,7 +16,7 @@ public class ColorUtilsTest Color darkColour = new Color(11, 30, 50); // dark blue - @Test + @Test(groups ={ "Functional" }) public void testDarkerThan() { assertEquals("Wrong darker shade", new Color(32, 69, 37), @@ -28,7 +28,7 @@ public class ColorUtilsTest assertNull(ColorUtils.darkerThan(null)); } - @Test + @Test(groups ={ "Functional" }) public void testBrighterThan() { assertEquals("Wrong brighter shade", new Color(255, 255, 255), // white @@ -43,7 +43,7 @@ public class ColorUtilsTest /** * @see http://www.rtapo.com/notes/named_colors.html */ - @Test + @Test(groups ={ "Functional" }) public void testToTkCode() { assertEquals("#fffafa", ColorUtils.toTkCode(new Color(255, 250, 250))); // snow diff --git a/test/jalview/util/ComparisonTest.java b/test/jalview/util/ComparisonTest.java index 837cbe6..d8efa69 100644 --- a/test/jalview/util/ComparisonTest.java +++ b/test/jalview/util/ComparisonTest.java @@ -12,7 +12,7 @@ import org.testng.annotations.Test; public class ComparisonTest { - @Test + @Test(groups ={ "Functional" }) public void testIsGap() { assertTrue(Comparison.isGap('-')); @@ -28,7 +28,7 @@ public class ComparisonTest * Test for isNucleotide is that sequences in a dataset are more than 85% * AGCTU. Test is not case-sensitive and ignores gaps. */ - @Test + @Test(groups ={ "Functional" }) public void testIsNucleotide() { SequenceI seq = new Sequence("eightypercent", "agctuAGCPV"); assertFalse(Comparison.isNucleotide(new SequenceI[] @@ -94,7 +94,7 @@ public class ComparisonTest /** * Test percentage identity calculation for two sequences. */ - @Test + @Test(groups ={ "Functional" }) public void testPID_matchGaps() { String seq1 = "ABCDEF"; diff --git a/test/jalview/util/DBRefUtilsTest.java b/test/jalview/util/DBRefUtilsTest.java index 036ad91..b06132b 100644 --- a/test/jalview/util/DBRefUtilsTest.java +++ b/test/jalview/util/DBRefUtilsTest.java @@ -22,7 +22,7 @@ public class DBRefUtilsTest * Test the method that selects DBRefEntry items whose source is in a supplied * list */ - @Test + @Test(groups ={ "Functional" }) public void testSelectRefs() { assertNull(DBRefUtils.selectRefs(null, null)); @@ -66,7 +66,7 @@ public class DBRefUtilsTest * Test the method that converts (currently three) database names to a * canonical name (not case-sensitive) */ - @Test + @Test(groups ={ "Functional" }) public void testGetCanonicalName() { assertNull(DBRefUtils.getCanonicalName(null)); @@ -83,7 +83,7 @@ public class DBRefUtilsTest DBRefUtils.getCanonicalName("UNIPROTKB/SWISS-CHEESE")); } - @Test + @Test(groups ={ "Functional" }) public void testIsDasCoordinateSystem() { assertFalse(DBRefUtils.isDasCoordinateSystem(null, null)); @@ -118,7 +118,7 @@ public class DBRefUtilsTest /** * Test 'parsing' a DBRef - non PDB case */ - @Test + @Test(groups ={ "Functional" }) public void testParseToDbRef() { SequenceI seq = new Sequence("Seq1", "ABCD"); @@ -135,7 +135,7 @@ public class DBRefUtilsTest /** * Test 'parsing' a DBRef - Stockholm PDB format */ - @Test + @Test(groups ={ "Functional" }) public void testParseToDbRef_PDB() { SequenceI seq = new Sequence("Seq1", "ABCD"); @@ -160,7 +160,7 @@ public class DBRefUtilsTest * Test the method that searches for matches references - case when we are * matching a reference with no mappings */ - @Test + @Test(groups ={ "Functional" }) public void testSearchRefs_noMapping() { DBRefEntry target = new DBRefEntry("EMBL", "2", "A1234"); @@ -189,7 +189,7 @@ public class DBRefUtilsTest * Test the method that searches for matches references - case when we are * matching a reference with a mapping */ - @Test + @Test(groups ={ "Functional" }) public void testSearchRefs_withMapping() { DBRefEntry target = new DBRefEntry("EMBL", "2", "A1234"); diff --git a/test/jalview/util/MapListTest.java b/test/jalview/util/MapListTest.java index 5579efb..6e7e19e 100644 --- a/test/jalview/util/MapListTest.java +++ b/test/jalview/util/MapListTest.java @@ -14,7 +14,7 @@ import org.testng.annotations.Test; public class MapListTest { - @Test + @Test(groups ={ "Functional" }) public void testSomething() { MapList ml = new MapList(new int[] @@ -219,7 +219,7 @@ public class MapListTest * Tests for method that locates ranges in the 'from' map for given range in * the 'to' map. */ - @Test + @Test(groups ={ "Functional" }) public void testLocateInFrom_noIntrons() { /* @@ -251,7 +251,7 @@ public class MapListTest * Tests for method that locates ranges in the 'from' map for given range in * the 'to' map. */ - @Test + @Test(groups ={ "Functional" }) public void testLocateInFrom_withIntrons() { /* @@ -274,7 +274,7 @@ public class MapListTest * Tests for method that locates ranges in the 'to' map for given range in the * 'from' map. */ - @Test + @Test(groups ={ "Functional" }) public void testLocateInTo_noIntrons() { /* @@ -314,7 +314,7 @@ public class MapListTest * Tests for method that locates ranges in the 'to' map for given range in the * 'from' map. */ - @Test + @Test(groups ={ "Functional" }) public void testLocateInTo_withIntrons() { /* @@ -357,7 +357,7 @@ public class MapListTest /** * Test equals method. */ - @Test + @Test(groups ={ "Functional" }) public void testEquals() { int[] codons = new int[] @@ -406,7 +406,7 @@ public class MapListTest /** * Test for the method that flattens a list of ranges into a single array. */ - @Test + @Test(groups ={ "Functional" }) public void testGetRanges() { List ranges = new ArrayList(); @@ -420,7 +420,7 @@ public class MapListTest /** * Check state after construction */ - @Test + @Test(groups ={ "Functional" }) public void testConstructor() { int[] codons = @@ -478,7 +478,7 @@ public class MapListTest /** * Test the method that creates an inverse mapping */ - @Test + @Test(groups ={ "Functional" }) public void testGetInverse() { int[] codons = @@ -498,7 +498,7 @@ public class MapListTest prettyPrint(ml2.getFromRanges())); } - @Test + @Test(groups ={ "Functional" }) public void testToString() { MapList ml = new MapList(new int[] diff --git a/test/jalview/util/MappingUtilsTest.java b/test/jalview/util/MappingUtilsTest.java index 9985fb3..2c0045b 100644 --- a/test/jalview/util/MappingUtilsTest.java +++ b/test/jalview/util/MappingUtilsTest.java @@ -36,7 +36,7 @@ public class MappingUtilsTest /** * Simple test of mapping with no intron involved. */ - @Test + @Test(groups ={ "Functional" }) public void testBuildSearchResults() { final Sequence seq1 = new Sequence("Seq1", "C-G-TA-GC"); @@ -89,7 +89,7 @@ public class MappingUtilsTest /** * Simple test of mapping with introns involved. */ - @Test + @Test(groups ={ "Functional" }) public void testBuildSearchResults_withIntron() { final Sequence seq1 = new Sequence("Seq1", "C-G-TAGA-GCAGCTT"); @@ -166,7 +166,7 @@ public class MappingUtilsTest * * @throws IOException */ - @Test + @Test(groups ={ "Functional" }) public void testMapSequenceGroup_sequences() throws IOException { /* @@ -259,7 +259,7 @@ public class MappingUtilsTest * * @throws IOException */ - @Test + @Test(groups ={ "Functional" }) public void testMapColumnSelection_proteinToDna() throws IOException { setupMappedAlignments(); @@ -357,7 +357,7 @@ public class MappingUtilsTest * * @throws IOException */ - @Test + @Test(groups ={ "Functional" }) public void testMapColumnSelection_dnaToProtein() throws IOException { setupMappedAlignments(); @@ -384,7 +384,7 @@ public class MappingUtilsTest assertEquals("[0, 1, 3]", cs.getSelected().toString()); } - @Test + @Test(groups ={ "Functional" }) public void testMapColumnSelection_null() throws IOException { setupMappedAlignments(); @@ -397,7 +397,7 @@ public class MappingUtilsTest * Tests for the method that converts a series of [start, end] ranges to * single positions */ - @Test + @Test(groups ={ "Functional" }) public void testFlattenRanges() { assertEquals("[1, 2, 3, 4]", @@ -423,7 +423,7 @@ public class MappingUtilsTest * * @throws IOException */ - @Test + @Test(groups ={ "Functional" }) public void testMapSequenceGroup_columns() throws IOException { /* @@ -506,7 +506,7 @@ public class MappingUtilsTest * * @throws IOException */ - @Test + @Test(groups ={ "Functional" }) public void testMapSequenceGroup_region() throws IOException { /* @@ -600,7 +600,7 @@ public class MappingUtilsTest assertEquals(4, mappedGroup.getEndRes()); } - @Test + @Test(groups ={ "Functional" }) public void testFindMappingsForSequence() { SequenceI seq1 = new Sequence("Seq1", "ABC"); diff --git a/test/jalview/util/QuickSortTest.java b/test/jalview/util/QuickSortTest.java index 7d10758..fac463a 100644 --- a/test/jalview/util/QuickSortTest.java +++ b/test/jalview/util/QuickSortTest.java @@ -30,7 +30,7 @@ public class QuickSortTest { c1, c2, c3, c4 }; } - @Test + @Test(groups ={ "Functional" }) public void testSort_byIntValues() { int[] values = new int[] @@ -41,7 +41,7 @@ public class QuickSortTest assertTrue(Arrays.equals(sortedThings, things)); } - @Test + @Test(groups ={ "Functional" }) public void testSort_byFloatValues() { float[] values = new float[] @@ -52,7 +52,7 @@ public class QuickSortTest assertTrue(Arrays.equals(sortedThings, things)); } - @Test + @Test(groups ={ "Functional" }) public void testSort_byDoubleValues() { double[] values = new double[] @@ -66,7 +66,7 @@ public class QuickSortTest /** * Sort by String is descending order, case-sensitive */ - @Test + @Test(groups ={ "Functional" }) public void testSort_byStringValues() { String[] values = new String[] @@ -81,7 +81,8 @@ public class QuickSortTest /** * Test whether sort is stable i.e. equal values retain their mutual ordering. */ - @Test(enabled = false) + @Test(groups = + { "Functional" }, enabled = false) public void testSort_withDuplicates() { int[] values = new int[] @@ -99,7 +100,7 @@ public class QuickSortTest * Test that exercises sort with a mostly zero-valued sortby array. May be of * interest to check the sort algorithm is efficient. */ - @Test + @Test(groups ={ "Functional" }) public void testSort_MostlyZeroValues() { char[] residues = new char[64]; diff --git a/test/jalview/util/ShiftListTest.java b/test/jalview/util/ShiftListTest.java index ea9b2e4..eae2811 100644 --- a/test/jalview/util/ShiftListTest.java +++ b/test/jalview/util/ShiftListTest.java @@ -11,7 +11,7 @@ import org.testng.annotations.Test; public class ShiftListTest { - @Test + @Test(groups ={ "Functional" }) public void testParseMap() { assertNull(ShiftList.parseMap(null)); diff --git a/test/jalview/util/StringUtilsTest.java b/test/jalview/util/StringUtilsTest.java index 7442530..e8de3bd 100644 --- a/test/jalview/util/StringUtilsTest.java +++ b/test/jalview/util/StringUtilsTest.java @@ -11,7 +11,7 @@ import org.testng.annotations.Test; public class StringUtilsTest { - @Test + @Test(groups ={ "Functional" }) public void testInsertCharAt() { char[] c1 = "ABC".toCharArray(); @@ -31,7 +31,7 @@ public class StringUtilsTest StringUtils.insertCharAt(c1, 7, 2, 'w'))); } - @Test + @Test(groups ={ "Functional" }) public void testDeleteChars() { char[] c1 = "ABC".toCharArray(); @@ -56,7 +56,7 @@ public class StringUtilsTest assertTrue(Arrays.equals(c1, StringUtils.deleteChars(c1, 3, 4))); } - @Test + @Test(groups ={ "Functional" }) public void testGetLastToken() { assertNull(StringUtils.getLastToken(null, null)); @@ -69,7 +69,7 @@ public class StringUtilsTest "file://localhost:8080/data/examples/file1.dat", "/")); } - @Test + @Test(groups ={ "Functional" }) public void testSeparatorListToArray() { String[] result = StringUtils.separatorListToArray( @@ -90,7 +90,7 @@ public class StringUtilsTest .separatorListToArray("abc='|'d|ef|g", "|"))); } - @Test + @Test(groups ={ "Functional" }) public void testArrayToSeparatorList() { assertEquals("*", StringUtils.arrayToSeparatorList(null, "*")); diff --git a/test/jalview/viewmodel/styles/ViewStyleTest.java b/test/jalview/viewmodel/styles/ViewStyleTest.java index 64b15a6..9e259a9 100644 --- a/test/jalview/viewmodel/styles/ViewStyleTest.java +++ b/test/jalview/viewmodel/styles/ViewStyleTest.java @@ -30,7 +30,7 @@ public class ViewStyleTest * @throws IllegalAccessException * @throws IllegalArgumentException */ - @Test + @Test(groups ={ "Functional" }) public void testCopyConstructor() throws IllegalArgumentException, IllegalAccessException { @@ -165,7 +165,7 @@ public class ViewStyleTest * @throws IllegalAccessException * @throws IllegalArgumentException */ - @Test + @Test(groups ={ "Functional" }) public void testEquals() throws IllegalArgumentException, IllegalAccessException { diff --git a/test/jalview/ws/PDBSequenceFetcherTest.java b/test/jalview/ws/PDBSequenceFetcherTest.java index ef03fd0..e54d5b9 100644 --- a/test/jalview/ws/PDBSequenceFetcherTest.java +++ b/test/jalview/ws/PDBSequenceFetcherTest.java @@ -49,7 +49,8 @@ public class PDBSequenceFetcherTest sf = new SequenceFetcher(false); } - @Test(enabled = false) + @Test(groups = + { "Functional" }, enabled = false) public void testRnaSeqRetrieve() throws Exception { List sps = sf.getSourceProxy("PDB"); diff --git a/test/jalview/ws/dbsources/PDBRestClientTest.java b/test/jalview/ws/dbsources/PDBRestClientTest.java index 3b3ef86..00c1e02 100644 --- a/test/jalview/ws/dbsources/PDBRestClientTest.java +++ b/test/jalview/ws/dbsources/PDBRestClientTest.java @@ -44,7 +44,8 @@ public class PDBRestClientTest { } - @Test + @Test(groups = + { "External" }) public void executeRequestTest() { List wantedFields = new ArrayList(); @@ -76,7 +77,7 @@ public class PDBRestClientTest assertTrue(response.getSearchSummary().size() > 99); } - @Test + @Test(groups ={ "Functional" }) public void getPDBDocFieldsAsCommaDelimitedStringTest() { List wantedFields = new ArrayList(); @@ -93,7 +94,8 @@ public class PDBRestClientTest assertEquals("", expectedResult, actualResult); } - @Test + @Test(groups = + { "External" }) public void parsePDBJsonExceptionStringTest() { List wantedFields = new ArrayList(); @@ -131,7 +133,8 @@ public class PDBRestClientTest assertEquals(expectedErrorMsg, parsedErrorResponse); } - @Test(expectedExceptions = Exception.class) + @Test(groups = + { "External" }, expectedExceptions = Exception.class) public void testForExpectedRuntimeException() throws Exception { List wantedFields = new ArrayList(); @@ -144,7 +147,8 @@ public class PDBRestClientTest new PDBRestClient().executeRequest(request); } - @Test + @Test(groups = + { "External" }) public void parsePDBJsonResponseTest() { List wantedFields = new ArrayList(); @@ -173,7 +177,7 @@ public class PDBRestClientTest assertTrue(response.getSearchSummary().size() == 14); } - @Test + @Test(groups ={ "Functional" }) public void getPDBIdColumIndexTest() { List wantedFields = new ArrayList(); @@ -186,7 +190,8 @@ public class PDBRestClientTest assertEquals(4, PDBRestClient.getPDBIdColumIndex(wantedFields, false)); } - @Test + @Test(groups = + { "External" }) public void externalServiceIntegrationTest() { ClientConfig clientConfig = new DefaultClientConfig(); diff --git a/test/jalview/ws/dbsources/UniprotTest.java b/test/jalview/ws/dbsources/UniprotTest.java index 9fba1cb..c89324b 100644 --- a/test/jalview/ws/dbsources/UniprotTest.java +++ b/test/jalview/ws/dbsources/UniprotTest.java @@ -35,7 +35,7 @@ public class UniprotTest /** * Test the method that unmarshals XML to a Uniprot model */ - @Test + @Test(groups ={ "Functional" }) public void testGetUniprotEntries() { Uniprot u = new Uniprot(); @@ -108,7 +108,7 @@ public class UniprotTest /** * Test the method that formats the sequence name in Fasta style */ - @Test + @Test(groups ={ "Functional" }) public void testConstructSequenceFastaHeader() { Uniprot u = new Uniprot(); diff --git a/test/jalview/ws/gui/Jws2ParamView.java b/test/jalview/ws/gui/Jws2ParamView.java index a3ae56d..b22f0f7 100644 --- a/test/jalview/ws/gui/Jws2ParamView.java +++ b/test/jalview/ws/gui/Jws2ParamView.java @@ -74,7 +74,8 @@ public class Jws2ParamView * rather than hang */ - @Test(enabled = false) + @Test(groups = + { "Functional" }, enabled = false) public void testJws2Gui() { Iterator presetEnum = presetTests.iterator(); diff --git a/test/jalview/ws/jabaws/DisorderAnnotExportImport.java b/test/jalview/ws/jabaws/DisorderAnnotExportImport.java index 470c39b..03fca21 100644 --- a/test/jalview/ws/jabaws/DisorderAnnotExportImport.java +++ b/test/jalview/ws/jabaws/DisorderAnnotExportImport.java @@ -86,7 +86,7 @@ public class DisorderAnnotExportImport /** * test for patches to JAL-1294 */ - @Test + @Test(groups ={ "Functional" }) public void testDisorderAnnotExport() { disorderClient = new AADisorderClient(iupreds.get(0), af, null, null); diff --git a/test/jalview/ws/jabaws/JalviewJabawsTestUtils.java b/test/jalview/ws/jabaws/JalviewJabawsTestUtils.java index ec901da..e6b7c58 100644 --- a/test/jalview/ws/jabaws/JalviewJabawsTestUtils.java +++ b/test/jalview/ws/jabaws/JalviewJabawsTestUtils.java @@ -51,7 +51,8 @@ public class JalviewJabawsTestUtils { "http://localhost:8080/jabaws", "http://www.compbio.dundee.ac.uk/jabaws" }; - @Test(enabled = false) + @Test(groups = + { "Functional" }, enabled = false) public void testAnnotExport() { fail("Not yet implemented"); diff --git a/test/jalview/ws/jabaws/JpredJabaStructExportImport.java b/test/jalview/ws/jabaws/JpredJabaStructExportImport.java index 49a3064..e347e55 100644 --- a/test/jalview/ws/jabaws/JpredJabaStructExportImport.java +++ b/test/jalview/ws/jabaws/JpredJabaStructExportImport.java @@ -71,7 +71,6 @@ public class JpredJabaStructExportImport for (Jws2Instance svc : disc.getServices()) { - if (svc.getServiceTypeURI().toLowerCase().contains("jpred")) { jpredws = svc; @@ -79,18 +78,10 @@ public class JpredJabaStructExportImport } System.out.println("State of jpredws: " + jpredws); - - if (jpredws == null) - { - Assert.fail("jpredws is null"); - } - + Assert.assertNotNull(jpredws, "jpredws is null!"); jalview.io.FileLoader fl = new jalview.io.FileLoader(false); - af = fl.LoadFileWaitTillLoaded(testseqs, jalview.io.FormatAdapter.FILE); - assertNotNull("Couldn't load test data ('" + testseqs + "')", af); - } @AfterClass @@ -103,7 +94,7 @@ public class JpredJabaStructExportImport } } - @Test + @Test(groups ={ "Functional" }) public void testJPredStructOneSeqOnly() { af.selectAllSequenceMenuItem_actionPerformed(null); @@ -155,7 +146,7 @@ public class JpredJabaStructExportImport } - @Test + @Test(groups ={ "Functional" }) public void testJPredStructExport() { @@ -226,7 +217,7 @@ public class JpredJabaStructExportImport + "\nCouldn't complete Annotation file roundtrip input/output/input test."); } - @Test + @Test(groups ={ "Functional" }) public void testJpredwsSettingsRecovery() { Assert.fail("not implemnented"); diff --git a/test/jalview/ws/jabaws/MinJabawsClientTests.java b/test/jalview/ws/jabaws/MinJabawsClientTests.java index 0a50e47..61f8203 100644 --- a/test/jalview/ws/jabaws/MinJabawsClientTests.java +++ b/test/jalview/ws/jabaws/MinJabawsClientTests.java @@ -23,7 +23,8 @@ public class MinJabawsClientTests * @throws Exception */ @SuppressWarnings("rawtypes") - @Test + @Test(groups = + { "Network" }) public void msaTest() throws Exception { String url; RegistryWS registry = Jws2Client diff --git a/test/jalview/ws/jabaws/RNAStructExportImport.java b/test/jalview/ws/jabaws/RNAStructExportImport.java index 5d9773a..dc33cbf 100644 --- a/test/jalview/ws/jabaws/RNAStructExportImport.java +++ b/test/jalview/ws/jabaws/RNAStructExportImport.java @@ -118,7 +118,7 @@ public class RNAStructExportImport } } - @Test + @Test(groups ={ "Functional" }) public void testRNAAliFoldValidStructure() { @@ -152,7 +152,7 @@ public class RNAStructExportImport } } - @Test + @Test(groups ={ "Functional" }) public void testRNAStructExport() { @@ -223,7 +223,7 @@ public class RNAStructExportImport + "\nCouldn't complete Annotation file roundtrip input/output/input test."); } - @Test + @Test(groups ={ "Functional" }) public void testRnaalifoldSettingsRecovery() { List opts = new ArrayList(); diff --git a/test/jalview/ws/jws2/ParameterUtilsTest.java b/test/jalview/ws/jws2/ParameterUtilsTest.java index 3403446..d76a532 100644 --- a/test/jalview/ws/jws2/ParameterUtilsTest.java +++ b/test/jalview/ws/jws2/ParameterUtilsTest.java @@ -59,7 +59,7 @@ public class ParameterUtilsTest disc = JalviewJabawsTestUtils.getJabawsDiscoverer(); } - @Test + @Test(groups ={ "Functional" }) public void testWriteParameterSet() throws WrongParameterException { for (Jws2Instance service : disc.getServices()) @@ -119,7 +119,7 @@ public class ParameterUtilsTest || serviceTests.contains(service.serviceType.toLowerCase()); } - @Test + @Test(groups ={ "Functional" }) public void testCopyOption() { for (Jws2Instance service : disc.getServices()) @@ -143,7 +143,7 @@ public class ParameterUtilsTest /** */ - @Test + @Test(groups ={ "Functional" }) public void testCopyParameter() { for (Jws2Instance service : disc.getServices()) diff --git a/test/jalview/ws/rest/RestClientTest.java b/test/jalview/ws/rest/RestClientTest.java index 70071a5..0c96c48 100644 --- a/test/jalview/ws/rest/RestClientTest.java +++ b/test/jalview/ws/rest/RestClientTest.java @@ -13,7 +13,7 @@ public class RestClientTest /** * Refactored 'as is' from main method */ - @Test + @Test(groups ={ "Functional" }) public void testGetRestClient() { /* diff --git a/test/jalview/ws/rest/ShmmrRSBSService.java b/test/jalview/ws/rest/ShmmrRSBSService.java index 99135d9..1f807b3 100644 --- a/test/jalview/ws/rest/ShmmrRSBSService.java +++ b/test/jalview/ws/rest/ShmmrRSBSService.java @@ -36,7 +36,7 @@ import org.testng.annotations.Test; public class ShmmrRSBSService { - @Test + @Test(groups ={ "Functional" }) public void testShmmrService() { @@ -46,7 +46,7 @@ public class ShmmrRSBSService RestClient.makeShmmrRestClient().service)); } - @Test + @Test(groups ={ "Functional" }) public void testShmmrServiceDataprep() throws Exception { RestClient _rc = RestClient.makeShmmrRestClient(); diff --git a/test/jalview/ws/seqfetcher/DasSequenceFetcher.java b/test/jalview/ws/seqfetcher/DasSequenceFetcher.java index c830f23..148cb9e 100644 --- a/test/jalview/ws/seqfetcher/DasSequenceFetcher.java +++ b/test/jalview/ws/seqfetcher/DasSequenceFetcher.java @@ -6,7 +6,7 @@ import org.testng.annotations.Test; public class DasSequenceFetcher { - @Test + @Test(groups ={ "Functional" }) public void testDasRegistryContact() { jalview.bin.Cache.getDasSourceRegistry().refreshSources(); diff --git a/test/jalview/ws/seqfetcher/DbRefFetcherTest.java b/test/jalview/ws/seqfetcher/DbRefFetcherTest.java index d6bd4b0..abaa7ec 100644 --- a/test/jalview/ws/seqfetcher/DbRefFetcherTest.java +++ b/test/jalview/ws/seqfetcher/DbRefFetcherTest.java @@ -62,7 +62,7 @@ public class DbRefFetcherTest { } - @Test + @Test(groups ={ "Functional" }) public void testStandardProtDbs() { String[] defdb = DBRefSource.PROTEINDBS; @@ -99,7 +99,8 @@ public class DbRefFetcherTest uniprot != null && i < 2); } - @Test + @Test(groups = + { "External" }) public void testEmblUniprotProductRecovery() throws Exception { String retrievalId = "CAA23748"; // "V00488"; @@ -108,7 +109,8 @@ public class DbRefFetcherTest verifyProteinNucleotideXref(retrievalId, embl); } - @Test + @Test(groups = + { "External" }) public void testEmblCDSUniprotProductRecovery() throws Exception { String retrievalId = "AAH29712"; -- 1.7.10.2