Skip to content

Commit

Permalink
Refactor gradle test so that we can run smoke tests separately from o…
Browse files Browse the repository at this point in the history
…ther tests by running: (#1265)

gradle test -PnonSmokeTests

or

gradle test -PsmokeTests
  • Loading branch information
rtaylorzfin authored Dec 17, 2024
1 parent 03332e2 commit 521e10d
Show file tree
Hide file tree
Showing 2 changed files with 172 additions and 167 deletions.
230 changes: 64 additions & 166 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -219,122 +219,6 @@ def translateVariableSet = [
'WEBHOST_FASTA_FILE_PATH',
]

//These are the only files that need to be searched and replaced (<!--|KEY|-->)
//Let's whittle this list down over time
//Other

def whitelistTemplateFiles = [
'cgi-bin/send_request.perl',
'cgi-bin/merge_markers.pl',
'server_apps/DB_maintenance/backupBlastDbsAndRsyncAlmostBlastDbs.sh',
'server_apps/DB_maintenance/checkVarcharOctetLength.pl',
'server_apps/DB_maintenance/check_undefined_environment.pl',
'server_apps/DB_maintenance/disable_updates.pl',
'server_apps/DB_maintenance/extentMonitoring/dailyExtentCheck.sh',
'server_apps/DB_maintenance/fx_permission_check.pl',
'server_apps/DB_maintenance/loadExternalNotes.pl',
'server_apps/DB_maintenance/loadExternalNotes.sql',
'server_apps/DB_maintenance/loadUp/README_loadUp',
'server_apps/DB_maintenance/loadUp/rsync.pl',
'server_apps/DB_maintenance/orphanChecks.pl',
'server_apps/DB_maintenance/postgres/compareTables.groovy',
'server_apps/DB_maintenance/pushDataToPublic.sh',
'server_apps/DB_maintenance/queryMonitoring/dailyQueryCostCheck.sh',
'server_apps/DB_maintenance/rotateInformixLog.sh',
'server_apps/DB_maintenance/set_unload_timestamp.sql',
'server_apps/DB_maintenance/warehouse/chromosomeMartPostgres/runChromosomeMart.sh',
'server_apps/DB_maintenance/warehouse/expressionMart/runExpressionMart.sh',
'server_apps/DB_maintenance/warehouse/phenotypeMart/runPhenotypeMart.sh',
'server_apps/DB_maintenance/warehouse/regenChromosomeMart.sh',
'server_apps/DB_maintenance/warehouse/regenExpressionMart.sh',
'server_apps/DB_maintenance/warehouse/regenPhenotypeMart.sh',
'server_apps/DB_maintenance/warehouse/switch.sh',
'server_apps/DB_maintenance/warehouse/who_is.sh',
'server_apps/DB_maintenance/warehouse/who_is_not.sh',
'server_apps/Reports/AnnualStats/runStats.sh',
'server_apps/Reports/BetterFish/betterFish.sql',
'server_apps/Reports/PubTracking/runAverageTimeInBinsCumulative.sh',
'server_apps/Reports/PubTracking/runLongestBinResidents.sh',
'server_apps/Reports/PubTracking/runMonthlyBinLengthReport.sh',
'server_apps/Reports/PubTracking/runPaperlessPubTrackingDailyIndexedMetrics.sh',
'server_apps/Reports/elsevier_report.pl',
'server_apps/Reports/reportPubsForGeneAndFeature.pl',
'server_apps/WebSiteTools/gen-jobs-rss.r',
'server_apps/WebSiteTools/gen-meetings-rss.r',
'server_apps/WebSiteTools/gen-news-rss.r',
'server_apps/WebSiteTools/signsoflife.sh',
'server_apps/apache/inc-redirect',
'server_apps/cron/crontab.production',
'server_apps/data_transfer/Downloads/GFF3/E_unload_ensembl_contig.sql',
'server_apps/data_transfer/Downloads/generateStagedAnatomy.pl',
'server_apps/data_transfer/Ensembl/fetch_ensdarT_dbacc.sh',
'server_apps/data_transfer/Ensembl/fetch_ensdarg.sh',
'server_apps/data_transfer/Ensembl/fetch_ensdargOttdargTable.sh',
'server_apps/data_transfer/Ensembl/fetch_ensembl_agp.sh',
'server_apps/data_transfer/Ensembl/fetch_sangerMutantInfo.sh',
'server_apps/data_transfer/Ensembl/notifyStaleIds.sh',
'server_apps/data_transfer/Ensembl/pullFromBioMart.pl',
'server_apps/data_transfer/Ensembl/reportEnsembleStatistics.sh',
'server_apps/data_transfer/ExternalSearch/CreateMarkerSearchPage.pl',
'server_apps/data_transfer/ExternalSearch/CreateMarkerSearchPage.sql',
'server_apps/data_transfer/GO/go.pl',
'server_apps/data_transfer/GO/gofile.sql',
'server_apps/data_transfer/GO/gofile2.sql',
'server_apps/data_transfer/GO/gofile2_all.sql',
'server_apps/data_transfer/GO/gp2protein.pl',
'server_apps/data_transfer/GO/gpad.pl',
'server_apps/data_transfer/GO/gpad2.0.sql',
'server_apps/data_transfer/GO/validateUniprotIDsZFIN.pl',
'server_apps/data_transfer/Genbank/gbaccession.pl',
'server_apps/data_transfer/Load/ReNo/Nomenclature/generate_special_Sanger_uniprot_nomenclature_run.sh',
'server_apps/data_transfer/Load/ReNo/load_run_report_hit.sh',
'server_apps/data_transfer/Load/blast_withdrawn.pl',
'server_apps/data_transfer/LoadOntology/parseHeader.pl',
'server_apps/data_transfer/LoadOntology/parseObo.pl',
'server_apps/data_transfer/MEOW/meow.pl',
'server_apps/data_transfer/NCBIStartEnd/NCBIStartEnd.pl',
'server_apps/data_transfer/OMIM/OMIM.pl',
'server_apps/data_transfer/OMIM/loadOMIM.sql',
'server_apps/data_transfer/ORTHO/downloadFiles.pl',
'server_apps/data_transfer/ORTHO/emailOrthologyReports.pl',
'server_apps/data_transfer/ORTHO/loadAndUpdateNCBIOrthologs.sql',
'server_apps/data_transfer/ORTHO/loadHumanSynonyms.sql',
'server_apps/data_transfer/ORTHO/parseHumanData.pl',
'server_apps/data_transfer/ORTHO/parseOrthoFile.pl',
'server_apps/data_transfer/ORTHO/reportOrthoNameChanges.pl',
'server_apps/data_transfer/ORTHO/runOrthology.pl',
'server_apps/data_transfer/ORTHO/updateZebrafishGeneNames.pl',
'server_apps/data_transfer/ORTHO/updateZebrafishGeneNames.sql',
'server_apps/data_transfer/PUBMED/Journal/checkAndUpdateJournals.sql',
'server_apps/data_transfer/PUBMED/Journal/insertJournalAlias.sql',
'server_apps/data_transfer/PUBMED/addMeshTermsToAllPubs.groovy',
'server_apps/data_transfer/PUBMED/addPMCidsToAllPubs.groovy',
'server_apps/data_transfer/PUBMED/loadNewPubs.sql',
'server_apps/data_transfer/PUBMED/load_complete_author_names.sql',
'server_apps/data_transfer/PUBMED/pubActivation.groovy',
'server_apps/data_transfer/PUBMED/updatePublicationDate.groovy',
'server_apps/data_transfer/RNACentral/loadTranscriptSequences.sql',
'server_apps/data_transfer/RNACentral/loadTscriptSeq.pl',
'server_apps/data_transfer/RNACentral/preLoadTranscriptSequence.sql',
'server_apps/data_transfer/RNACentral/runTscriptSequenceLoad.pl',
'server_apps/data_transfer/ResourceCenters/pullFromEZRC.pl',
'server_apps/data_transfer/ResourceCenters/pullFromZIRC.pl',
'server_apps/data_transfer/ResourceCenters/pushToZirc.pl',
'server_apps/data_transfer/ResourceCenters/pushToZirc.sql',
'server_apps/data_transfer/SNP/addNewClonesJSmith.pl',
'server_apps/data_transfer/SNP/addTalbotSNPAttr.sql',
'server_apps/data_transfer/SNP/dbSNP.pl',
'server_apps/data_transfer/SNP/loadNewSNPAttrs.sql',
'server_apps/data_transfer/SNP/loadNewSNPs.sql',
'server_apps/data_transfer/eco_go_mapping/insert_eco_go_map.sql',
'server_apps/data_transfer/maintainTermDisplay/checkRNAConsequenceTerm.groovy',
'server_apps/data_transfer/zfishbook/preprocess_zfishbook.pl',
'server_apps/data_transfer/zfishbook/zfishbook.pl',
'server_apps/data_transfer/zfishbook/zfishbook.sh',
]

project.ext.set("whitelistTemplateFiles", whitelistTemplateFiles)

// load properties into gradle
task setup {
project.ext.ttNameMap = new Properties()
Expand Down Expand Up @@ -855,77 +739,91 @@ test {
testLogging {
//showStandardStreams = true
}

def includeSmokeTests = project.hasProperty('smokeTests')
def includeNonSmokeTests = project.hasProperty('nonSmokeTests')
if (!includeSmokeTests && !includeNonSmokeTests) {
//if neither flag is set, run all tests
includeSmokeTests = true
includeNonSmokeTests = true
}

filter {
includeTestsMatching "org.zfin.UnitTests"
//spock tests

includeTestsMatching "org.zfin.publication.MeshHeadingSpec"
if (includeNonSmokeTests) {
includeTestsMatching "org.zfin.UnitTests"
//spock tests

includeTestsMatching "org.zfin.publication.presentation.PublicationValidatorSpec"
includeTestsMatching "org.zfin.publication.repository.PublicationRepositorySpec"
includeTestsMatching "org.zfin.feature.service.MutationDetailsConversionServiceSpec"
includeTestsMatching "org.zfin.util.ReportGeneratorSpec"
includeTestsMatching "org.zfin.search.service.SolrServiceSpec"
includeTestsMatching "org.zfin.search.service.SolrQueryFacadeSpec"
includeTestsMatching "org.zfin.search.service.MarkerSearchServiceSpec"
includeTestsMatching "org.zfin.search.service.SearchSuggestionServiceSpec"
includeTestsMatching "org.zfin.publication.MeshHeadingSpec"

includeTestsMatching "org.zfin.ontology.service.RibbonServiceIntegrationSpec"
includeTestsMatching "org.zfin.uniquery.RelatedLinksSpec"
includeTestsMatching "org.zfin.publication.presentation.PublicationValidatorSpec"
includeTestsMatching "org.zfin.publication.repository.PublicationRepositorySpec"
includeTestsMatching "org.zfin.feature.service.MutationDetailsConversionServiceSpec"
includeTestsMatching "org.zfin.util.ReportGeneratorSpec"
includeTestsMatching "org.zfin.search.service.SolrServiceSpec"
includeTestsMatching "org.zfin.search.service.SolrQueryFacadeSpec"
includeTestsMatching "org.zfin.search.service.MarkerSearchServiceSpec"
includeTestsMatching "org.zfin.search.service.SearchSuggestionServiceSpec"

includeTestsMatching "org.zfin.ontology.service.RibbonServiceIntegrationSpec"
includeTestsMatching "org.zfin.uniquery.RelatedLinksSpec"

// Failing tests that we may want to bring back: (ZFIN-8271)
// includeTestsMatching "org.zfin.uniquery.CategoriesAndFacetsSpec"
// includeTestsMatching "org.zfin.uniquery.QuerySpec"
// includeTestsMatching "org.zfin.uniquery.ResultAttributesSpec"
includeTestsMatching "org.zfin.sequence.repository.SequenceRepositorySpec"
includeTestsMatching "org.zfin.feature.FeatureServiceSpec"
includeTestsMatching "org.zfin.curation.service.CurationDTOConversionServiceSpec"
includeTestsMatching "org.zfin.expression.ExpressionSearchSpec"
includeTestsMatching "org.zfin.marker.presentation.GeneAddFormBeanValidatorSpec"
includeTestsMatching "org.zfin.marker.presentation.MarkerGoServiceIntegrationSpec"
includeTestsMatching "org.zfin.marker.presentation.SequenceTargetingReagentAddBeanValidatorSpec"
includeTestsMatching "org.zfin.figure.repository.FigureRepositorySpec"
includeTestsMatching "org.zfin.gbrowse.presentation.GBrowseImageSpec"
includeTestsMatching "org.zfin.figure.service.ImageServiceSpec"

/*need to figure out ..all tests fail here

includeTestsMatching "org.zfin.sequence.repository.SequenceRepositorySpec"
includeTestsMatching "org.zfin.feature.FeatureServiceSpec"
includeTestsMatching "org.zfin.curation.service.CurationDTOConversionServiceSpec"
includeTestsMatching "org.zfin.expression.ExpressionSearchSpec"
includeTestsMatching "org.zfin.marker.presentation.GeneAddFormBeanValidatorSpec"
includeTestsMatching "org.zfin.marker.presentation.MarkerGoServiceIntegrationSpec"
includeTestsMatching "org.zfin.marker.presentation.SequenceTargetingReagentAddBeanValidatorSpec"
includeTestsMatching "org.zfin.figure.repository.FigureRepositorySpec"
includeTestsMatching "org.zfin.gbrowse.presentation.GBrowseImageSpec"
includeTestsMatching "org.zfin.figure.service.ImageServiceSpec"

/*need to figure out ..all tests fail here
includeTestsMatching "org.zfin.figure.service.FigureViewServiceSpec"*/

//includeTestsMatching "org.zfin.publication.PublicationServiceSpec"
// PublicationServiceSpec > #authorString should bring back #author FAILED
//org.spockframework.runtime.SpockAssertionError at UnrollIterationNameProvider.java:80
//includeTestsMatching "org.zfin.publication.PublicationServiceSpec"
// PublicationServiceSpec > #authorString should bring back #author FAILED
//org.spockframework.runtime.SpockAssertionError at UnrollIterationNameProvider.java:80


/*includeTestsMatching "org.zfin.figure.service.ImageServiceSpec" (needs fixing..null pointer here: tempDir.newFolder(ZfinPropertiesEnum.IMAGE_LOAD.toString(), "medium"))
/*includeTestsMatching "org.zfin.figure.service.ImageServiceSpec" (needs fixing..null pointer here: tempDir.newFolder(ZfinPropertiesEnum.IMAGE_LOAD.toString(), "medium"))
includeTestsMatching "org.zfin.figure.service.VideoServiceSpec"*/

/*//following use geb..likely not to fix
/*//following use geb..likely not to fix
includeTestsMatching "org.zfin.figure.presentation.FigureViewWebSpec" (geb test)
includeTestsMatching "org.zfin.marker.MarkerselectWebSpec" (geb test)
includeTestsMatching "org.zfin.framework.GroovyWebSpec"(geb test)
includeTestsMatching "org.zfin.ontology.service.RibbonServiceIntegrationSpec"(geb test)*/

// db unit tests
includeTestsMatching "org.zfin.DbUnitTests"
includeTestsMatching "org.zfin.infrastructure.EnumValidationTest"
includeTestsMatching "org.zfin.DbControllerTests"
includeTestsMatching "org.zfin.ThirdPartyServiceTests"

includeTestsMatching "org.zfin.anatomy.AnatomySmokeTest"
includeTestsMatching "org.zfin.antibody.smoketest.AntibodySmokeTest"
includeTestsMatching "org.zfin.sequence.blast.smoketest.BlastSmokeTest"
includeTestsMatching "org.zfin.datatransfer.smoketests.DownloadSmokeTest"
includeTestsMatching "org.zfin.feature.presentation.FeatureDetailSmokeTest"
includeTestsMatching "org.zfin.feature.presentation.GenotypeDetailSmokeTest"
includeTestsMatching "org.zfin.expression.presentation.FigureSummarySmokeTest"
includeTestsMatching "org.zfin.fish.smoketest.FishSmokeTest"
includeTestsMatching "org.zfin.fish.smoketest.PhenotypeSummarySmokeTest"
includeTestsMatching "org.zfin.httpunittest.MarkerViewSmokeTest"
includeTestsMatching "org.zfin.sebservice.MarkerRestSmokeTest"
//include specific method in any of the tests
// includeTestsMatching "*ActiveDataTest"
// db unit tests
includeTestsMatching "org.zfin.DbUnitTests"
includeTestsMatching "org.zfin.infrastructure.EnumValidationTest"
includeTestsMatching "org.zfin.DbControllerTests"
includeTestsMatching "org.zfin.ThirdPartyServiceTests"
}

if (includeSmokeTests) {
includeTestsMatching "org.zfin.anatomy.AnatomySmokeTest"
includeTestsMatching "org.zfin.antibody.smoketest.AntibodySmokeTest"
includeTestsMatching "org.zfin.sequence.blast.smoketest.BlastSmokeTest"
includeTestsMatching "org.zfin.datatransfer.smoketests.DownloadSmokeTest"
includeTestsMatching "org.zfin.feature.presentation.FeatureDetailSmokeTest"
includeTestsMatching "org.zfin.feature.presentation.GenotypeDetailSmokeTest"
includeTestsMatching "org.zfin.expression.presentation.FigureSummarySmokeTest"
includeTestsMatching "org.zfin.fish.smoketest.FishSmokeTest"
includeTestsMatching "org.zfin.fish.smoketest.PhenotypeSummarySmokeTest"
includeTestsMatching "org.zfin.httpunittest.MarkerViewSmokeTest"
includeTestsMatching "org.zfin.sebservice.MarkerRestSmokeTest"
//include specific method in any of the tests
// includeTestsMatching "*ActiveDataTest"
}
}

reports {
Expand Down
Loading

0 comments on commit 521e10d

Please sign in to comment.