Contributions
How to Get Total Test Cases count and Execution Time taken on Project from Project Teardown
How can i get from Project Teardown 1) Total Test Cases Count which is Enabled only not disabled 2) Total Time taken for executionSolved5 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.4KViews0likes3CommentsRe: ReadyAPI 2.7 Incorrect Allure Report
In you second screen shot i can see only 3 Test Steps, for 3 Test Cases in my case Actual was 200 Test Cases and 377 Test Steps but i can see on dashboard as 377 Test Cases could you add more steps and run the project and see if you can see correct value of test cases than appreciate if you can provide steps how you configured Allure Reports5 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.8KViews0likes1CommentRe: Groovy Script to send html report via email body
Ready API is generating the reports under projectpath and we are not using any CI so i required once report generate of single html page i required to send that to the group which should go single page report on email body5 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.4KViews0likes0CommentsReadyAPI 2.7 Incorrect Allure Report
Integrated Allure Reports but Allure reports is coming like In my project I have 200 Test Cases and 377 Test Steps but on Allure report dashboard i can Test Cases as 377 How can i configure/customize allure reportsSolved5 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.9KViews0likes3Comments- 5 years agoPlace ReadyAPI QuestionsReadyAPI Questions3.3KViews0likes9Comments
Project Level Teardown Script
I need some syntax update on this Basically below script is doing All test Cases sucess and fail report But i required only Failed Cases to be report along with properties appreciate if any one can modify this /** * * Below is the TearDown script for SoapUI Project level * Which create a custom report in a given file * Modify the variable "reportFileName" below * **/ //Modify the file as needed for report file //def reportFileName = '/tmp/abctestreport.txt' //Adding the below as user wants specific directory //Get the project path def dataFolder = new com.eviware.soapui.support.GroovyUtils(context).projectPath //Create today's date for storing response def today = new Date().format("yyyy-MM-dd") def filePrefix = "${dataFolder}/TestReports/xxx_WebAPI_${today}" as String def fileNamePart = new Date().format("yyyy-MM-dd'T'HH.mm.ss") //creating filename dynamically. def reportFileName = "${filePrefix}/xxx_WebAPI_TestReport_${fileNamePart}.txt" as String //NOTE: Not required to edit beyond this point /** * This class holds the test case details **/ class TestCaseResultHolder { def log Map<String, String> properties = [:] boolean status def createProperties(testCase) { testCase.getPropertyNames().each { key -> properties[key] = testCase.getPropertyValue(key) } } def getCaseResult(caseRunner, caseName) { log.info "Checking test case status ${caseName}" if ( caseRunner.status.toString() == 'FAILED' ){ log.error "Test case $caseName has failed" for ( stepResult in caseRunner?.results ){ stepResult.messages.each() { msg -> log.info msg } } return false } else { log.info "${caseName} is passed" } true } def buildCaseResult(caseRunner, caseName) { status = getCaseResult(caseRunner, caseName) if (!status) { createProperties(caseRunner.testCase) } } } /** * This class holds the test suite details **/ class SuiteResultsHolder { def log Map<String, TestCaseResultHolder> casaeResults = [:] int testCaseCount = 0 int passedCasesCount = 0 int failedCasesCount = 0 def buildSuiteResults(suiteRunner, suiteName){ log.info "Building results of test suite ${suiteName}" for ( caseRunner in suiteRunner?.results ) { def caseName = caseRunner.testCase.name testCaseCount++ def tcHolder = new TestCaseResultHolder(log: log) tcHolder.buildCaseResult(caseRunner, caseName) casaeResults[caseName] = tcHolder if (tcHolder.status) { passedCasesCount++ } else { failedCasesCount++ } } } def getStatus() { (0 < failedCasesCount) ? false : true } } /** * This class holds the project details **/ class ProjectResultsHolder { def log Map<String, SuiteResultsHolder> suiteResults = [:] int suiteCount = 0 int passedSuitecount = 0 int failedSuiteCount = 0 def buildProjectResults(projectRunner, projectName) { log.info "Building results of test project ${projectName}" for(suiteRunner in projectRunner?.results) { def suiteName = suiteRunner.testSuite.name suiteCount++ def suiteResultsHolder = new SuiteResultsHolder(log: log) suiteResultsHolder.buildSuiteResults(suiteRunner, suiteName) suiteResults[suiteName] = suiteResultsHolder if (suiteResultsHolder.status) { passedSuitecount++ } else { failedSuiteCount++ } } } def getStatus() { (0 < failedSuiteCount) ? false : true } } //Get the status string based on boolean def getResult(status){ status == true ? 'SUCCEED' : 'FAILED'} //Draws a line def drawLine(def letter = '=', def count = 70) { letter.multiply(count)} //Gets the summary report def getSummaryReport(project, projectResultHolder) { def report = new StringBuffer() report.append(drawLine()).append('\n') report.append("\t\t\tTest Execution Summary\n") report.append(drawLine('-', 60)).append('\n') report.append("Project : ${project.name}\n") report.append("Result : ${getResult(projectResultHolder.status)}\n") report.append("Total test suites executed: ${projectResultHolder.suiteCount}\n") report.append("Test suites passed: ${projectResultHolder.passedSuitecount}\n") report.append("Test suites failed: ${projectResultHolder.failedSuiteCount}\n") report.append(drawLine()).append('\n') report } //Gets the test case report def getTestCaseReport(testCaseReport) { def report = new StringBuffer() report.append(drawLine('-', 60)).append('\n') report.append("\t\tTest Case Details:\n") report.append(drawLine('-', 60)).append('\n') testCaseReport.each { kase, tcReport -> report.append("Name : ${kase}\n") report.append("Status : ${getResult(tcReport.status)}\n") if (!tcReport.status) { report.append("Properties : ${tcReport.properties.toString()}\n") } } report } //Get the detailed report def getDetailedReport(projectResultHolder) { def report = new StringBuffer() report.append(drawLine()).append('\n') report.append("\t\t\tTest Execution Detailed Report\n") report.append(drawLine()).append('\n') projectResultHolder.suiteResults.each { suite, details -> report.append("Test Suite : ${suite}\n") report.append("Result : ${getResult(details.status)}\n") report.append("Total Cases : ${details.testCaseCount}\n") report.append("Cases Passed : ${details.passedCasesCount}\n") report.append("Cases Failed: ${details.failedCasesCount}\n") report.append(getTestCaseReport(details.casaeResults)) report.append(drawLine()).append('\n') report.append(drawLine()).append('\n') } report } //Save the contents to a file def saveToFile(file, content) { if (!file.parentFile.exists()) { file.parentFile.mkdirs() log.info "Directory did not exist, created" } file.write(content) assert file.exists(), "${file.name} not created" } def holder = new ProjectResultsHolder(log: log) holder.buildProjectResults(runner, project.name) def finalReport = new StringBuffer() finalReport.append(getSummaryReport(project, holder)) finalReport.append(getDetailedReport(holder)) def reportFile = new File(reportFileName) saveToFile(reportFile, finalReport.toString())Solved5 years agoPlace ReadyAPI QuestionsReadyAPI Questions3.8KViews0likes14Comments