Contributions
Re: Disable reststep via groovy
Hinmrao Answers: 1. Quite complex to understand without the logic of the report generation script. - attached library suite xml, which generates report and has teststep pass/ fail status and where i would like to have logic to disable passed steps 2. Let us say, you have executed the tests, x tests passed and y tests failed. And assume test tool is restarted. How do you know the state of the tests? Just a scenario. -- library suite xml has logic to check step pass or fail. if status.toString() == 'OK'. so. before new test is restarted, I call this report generation script, which creates pass/fail report of steps for 1st iteration and when test will be reiterated with 2nd data, ideally report generation will again get executed and create pass/fail report for second iteration but for 2nd data. ( What i thinking to do, when report gets generated for 1st data and before test is restarted, disable all pass steps, so when test is restarted, it only runs for failed steps with 2nd set of data and report gets generated for those alone steps) 3. Isn't it ok to run all the tests again once you get some fixes in the application / APIs? - it's ok, but its not API failure, some failures are due to data being wrong. So, just want to make sure it's really not a API issue and it's data issue. 4. Each and every test case should be independent. The report Generation in a separate suite does not make sense. Re-organize it and remove it from a separate suite. Say, move it Tear-down script of project. - I have tear down script in project strucuture, which in turn calls library suite and report generation script inside of it. Teardown script: testRunner.testCase.testSuite.project.testSuites["Library"].testCases["Reporting_Utility"]. testSteps["GenerateCSVReport"].run(testRunner, context);1.3KViews0likes1CommentRe: Disable reststep via groovy
Hinmrao, not sure if you had a chance to go through below explanation of my project and why I am disabling it. Here it is again. also attached pic again, let me know if you can see it now. Testsuite - 1) UST1 2) Library Testsuite # 1 - UST1 has two tcs inside Tc # 1 - UST1(disabled) - this is where all my test steps are and what gets executed evertytime, it's disabled. Steps inside are executed with "ReadInput" step in Tc # 2 - DataLoop. Tc # 2 iterates n times and executed steps from Tc # 1 with different data. ( My goal is to only run failed step in next iteration, hence looking in to solution to disable pass steps) Testsuite # 2 - Library GenerateCSVReport - this is report generation step for testsuite # 1, I am generating teststep pass/fail report for every iteration for Tc # 1 in Testsuite # 1. I am adding step disable logic in here, while writing it to report, if step passes in iteration 1, disable along with report generation and that's where i get this error. ( see in red in log section)1.8KViews0likes3CommentsRe: Disable reststep via groovy
Hi Below is my project structure, Testsuite - 1) UST1 2) Library Testsuite # 1 - UST1 has two tcs inside Tc # 1 - UST1(disabled) - this is where all my test steps are and what gets executed evertytime, it's disabled. Steps inside are executed with "ReadInput" step in Tc # 2 - DataLoop. Tc # 2 iterates n times and executed steps from Tc # 1 with different data. ( My goal is to only run failed step in next iteration, hence looking in to solution to disable pass steps) Testsuite # 2 - Library GenerateCSVReport - this is report generation step for testsuite # 1, I am generating teststep pass/fail report for every iteration for Tc # 1 in Testsuite # 1. I am adding step disable logic in here, while writing it to report, if step passes in iteration 1, disable along with report generation and that's where i get this error. ( see in red in log section)1.5KViews0likes16CommentsRe: Disable reststep via groovy
thank you for trying, but I keep getting this error. they way i am doing is: I execute suite and have another suite to print report of first suite, there i am adding mentioned groovy step and check the status of step is pass from first suite and trying to disable it and I get this error.1.6KViews0likes1Comment