Package com.complexible.stardog.api.test
Class TestRunner
- java.lang.Object
-
- com.complexible.stardog.api.test.TestRunner
-
public class TestRunner extends java.lang.Object
Runs all the tests in a suite.
-
-
Constructor Summary
Constructors Constructor Description TestRunner(ConnectionConfiguration config)
Creates a test runner with the credentials specified in the given config.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
compareGraphs(java.lang.String name, java.util.Set<Statement> actual, java.util.Set<Statement> expected)
static void
compareTupleQueryResults(java.lang.String name, boolean ordered, com.stardog.stark.query.impl.SelectQueryResultImpl actual, com.stardog.stark.query.impl.SelectQueryResultImpl expected)
static com.google.common.collect.LinkedHashMultiset<java.util.Map<java.lang.String,Value>>
convertQueryResult(SelectQueryResult queryResult)
boolean
isRunUpdateQueriesOnce()
boolean
isShowPlans()
boolean
isShowStackTraces()
boolean
isStopOnFirstFailure()
static boolean
readBooleanQueryResult(java.nio.file.Path file)
java.util.List<TestResult>
run(TestSuite suite)
Runs all the tests in the given suite and returns the results.void
setRunUpdateQueriesOnce(boolean runUpdateQueriesOnce)
void
setShowPlans(boolean showPlans)
void
setShowStackTraces(boolean showStackTraces)
void
setStopOnFirstFailure(boolean stopOnFirstFailure)
-
-
-
Constructor Detail
-
TestRunner
public TestRunner(ConnectionConfiguration config)
Creates a test runner with the credentials specified in the given config. The server, database and reasoning settings in the configuration will be overridden by values specified in the tests.
-
-
Method Detail
-
run
public java.util.List<TestResult> run(TestSuite suite)
Runs all the tests in the given suite and returns the results. The tests that are included in child suites are also run. The results will be returned in the order the tests are run.
-
readBooleanQueryResult
public static boolean readBooleanQueryResult(java.nio.file.Path file) throws java.io.IOException
- Throws:
java.io.IOException
-
compareTupleQueryResults
public static void compareTupleQueryResults(java.lang.String name, boolean ordered, com.stardog.stark.query.impl.SelectQueryResultImpl actual, com.stardog.stark.query.impl.SelectQueryResultImpl expected)
-
convertQueryResult
public static com.google.common.collect.LinkedHashMultiset<java.util.Map<java.lang.String,Value>> convertQueryResult(SelectQueryResult queryResult)
-
compareGraphs
public static void compareGraphs(java.lang.String name, java.util.Set<Statement> actual, java.util.Set<Statement> expected)
-
isShowPlans
public boolean isShowPlans()
-
setShowPlans
public void setShowPlans(boolean showPlans)
-
isStopOnFirstFailure
public boolean isStopOnFirstFailure()
-
setStopOnFirstFailure
public void setStopOnFirstFailure(boolean stopOnFirstFailure)
-
isRunUpdateQueriesOnce
public boolean isRunUpdateQueriesOnce()
-
setRunUpdateQueriesOnce
public void setRunUpdateQueriesOnce(boolean runUpdateQueriesOnce)
-
isShowStackTraces
public boolean isShowStackTraces()
-
setShowStackTraces
public void setShowStackTraces(boolean showStackTraces)
-
-