Gradle के लिए परीक्षण {} विन्यास ब्लॉक के बराबर परीक्षण विन्यास ब्लॉकGradle - एंड्रॉयड
https://docs.gradle.org/current/dsl/org.gradle.api.tasks.testing.Test.html
`` `
apply plugin: 'java' // adds 'test' task
test {
// enable TestNG support (default is JUnit)
useTestNG()
// set a system property for the test JVM(s)
systemProperty 'some.prop', 'value'
// explicitly include or exclude tests
include 'org/foo/**'
exclude 'org/boo/**'
// show standard out and standard error of the test JVM(s) on the console
testLogging.showStandardStreams = true
// set heap size for the test JVM(s)
minHeapSize = "128m"
maxHeapSize = "512m"
// set JVM arguments for the test JVM(s)
jvmArgs '-XX:MaxPermSize=256m'
// listen to events in the test execution lifecycle
beforeTest { descriptor ->
logger.lifecycle("Running test: " + descriptor)
}
// listen to standard out and standard error of the test JVM(s)
onOutput { descriptor, event ->
logger.lifecycle("Test: " + descriptor + " produced standard out/err: " + event.message)
}
}
एक परीक्षण विन्यास के सभी प्रकार जहां निर्धारित कर सकते हैं (मैं है ज्यादातर ढेर आकार में रुचि रखते हैं)। क्या एंड्रॉइड परियोजनाओं के लिए कुछ समान है?
यही वह है जिसे मैं धन्यवाद चाहता था। मैं पहले से ही इसका उपयोग कर रहा था, लेकिन जब मैंने अपने परीक्षण चलाते समय स्मृति त्रुटियों से बाहर निकलना शुरू कर दिया तो मुझे पूरी तरह याद आया। मैंने https://docs.gradle.org/current/dsl/org.gradle.api.tasks.testing.Test.html यहां पाए गए कुछ और पैरामीटरों की कोशिश की और वे काम करना प्रतीत हुए –