Contributions
- 8 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.7KViews0likes2Comments
adding assertion fails on mac
When changing assertions on a test step, throws the following exception on Ready API 1.7.0-m on mac Thu Sep 22 17:23:24 IST 2016:ERROR:java.lang.NullPointerException java.lang.NullPointerException at com.eviware.soapui.impl.wsdl.panels.teststeps.RestTestRequestDesktopPanel$InternalAssertionsListener.assertionAdded(RestTestRequestDesktopPanel.java:242) at com.eviware.soapui.impl.wsdl.support.assertions.AssertionsSupport.fireAssertionAdded(AssertionsSupport.java:180) at com.eviware.soapui.impl.wsdl.support.assertions.AssertionsSupport.addWsdlAssertion(AssertionsSupport.java:302) at com.eviware.soapui.impl.wsdl.teststeps.RestTestRequest.addAssertion(RestTestRequest.java:182) at com.eviware.soapui.impl.wsdl.teststeps.RestTestRequest.addAssertion(RestTestRequest.java:1) at com.eviware.soapui.impl.wsdl.panels.assertions.AddAssertionPanel.handleOk(AddAssertionPanel.java:315) at com.eviware.soapui.impl.wsdl.panels.assertions.AddAssertionPanel$AssertionListMouseAdapter.mouseClicked(AddAssertionPanel.java:525) at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:270) at java.awt.Component.processMouseEvent(Component.java:6538) at javax.swing.JComponent.processMouseEvent(JComponent.java:3324) at java.awt.Component.processEvent(Component.java:6300) at java.awt.Container.processEvent(Container.java:2236) at java.awt.Component.dispatchEventImpl(Component.java:4891) at java.awt.Container.dispatchEventImpl(Container.java:2294) at java.awt.Component.dispatchEvent(Component.java:4713) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4534) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466) at java.awt.Container.dispatchEventImpl(Container.java:2280) at java.awt.Window.dispatchEventImpl(Window.java:2750) at java.awt.Component.dispatchEvent(Component.java:4713) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) at java.awt.EventQueue$4.run(EventQueue.java:731) at java.awt.EventQueue$4.run(EventQueue.java:729) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:728) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109) at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184) at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:229) at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:227) at java.security.AccessController.doPrivileged(Native Method) at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:227) at java.awt.Dialog.show(Dialog.java:1084) at java.awt.Component.show(Component.java:1673) at java.awt.Component.setVisible(Component.java:1625) at java.awt.Window.setVisible(Window.java:1014) at java.awt.Dialog.setVisible(Dialog.java:1005) at com.eviware.soapui.impl.wsdl.actions.project.SimpleDialog.setVisible(SimpleDialog.java:170) at com.eviware.soapui.impl.wsdl.teststeps.actions.AddAssertionAction$1.run(AddAssertionAction.java:66) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:726) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)8 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.8KViews0likes5CommentsAble to modify JUNIT reports to include Request/Response for failed cases
Right now, JUNIT reports are not modifiable at all. They are important when comes to running test cases via some CI and host result/report at a url. JUNIT reports are so simple and do not give information about the REQEST/RESPONSE of a failed step to actually look at the reason why the test cases failed on the test server which might run successfully on local. Across various communities, I see that this feature is required by most of the users, a lot of discussion around it, and the way suggested is via maven project which seems to put more effort than writing test cases.4.3KViews3likes2CommentsRe: How to customise JUnit html report to include request and response for failed cases
yes, I agree, but I am amazed that no where in the community, such question is answered in a step by step manner. Which I think Smartbear should look into, and provide some sort of training or online videos to teach people to customise reports.8 years agoPlace ReadyAPI QuestionsReadyAPI Questions6.7KViews0likes1CommentRe: How to customise JUnit html report to include request and response for failed cases
Hi,nmrao, I think one needs to have some bit of expertise in jasper reports in order to customise them. I know my requirements and I have maintained my 2500+ test cases such that, there isno test case having 30 test steps, using setup and tear down efficiently(without any jdbc requests). And what I want to fetch request and response is only for failed step and not all of them, as the default JUnit report shows only failed test steps. And, thanks for the links, but I am not able to follow them.Are there any online tutorials/videos for report customisation?8 years agoPlace ReadyAPI QuestionsReadyAPI Questions6.7KViews0likes4CommentsRe: How to customise JUnit html report to include request and response for failed cases
Hi,TanyaYatskovska, I knew this link is coming as the reply to my question. I am finding a bit difficult to follow the limited set of instructions there, for example, 1. I just want to modify the JUnit Report to include Request and Response, as mentioned in the attached screenshot. 2. I have no idea the default JUnit Report fetches which Available Reports?Or do I need to add a new Report all together? 3. Information to use Report parameter is too limited.8 years agoPlace ReadyAPI QuestionsReadyAPI Questions6.8KViews0likes7CommentsHow to customise JUnit html report to include request and response for failed cases
I have around 2500+ test cases organised under 40 testsuites, which are runningvia cli by Jenkins and default JUnit style report is hosted at a url. Sometimes, it is pretty difficult to look at the assertion fails and learn about the error. So, I am planning to include request and response in the report for the failing test cases. I know, there are quite a few documents available, but are not easy to understand. Anyone with a simpler and swift solution? Currently, the default report gives, Name, Status, Type and Time columns for failed test cases, I just need the same format, but Name, Status, Type, Request, Response and Time.7.1KViews0likes10CommentsRe: I wan't to use SoupUI (Free Version) with JavaScript assertion.
After investing few hours on this topic, I am able to run few scripts in javascript, they are too basic scripts, but can be used to perform subtle actions. 1. Script to run a test step at testcase tear down - Prerequisites - have a test step inside a testcase and disable it, following testcase teardown script will execute the test step For me, Add a priority is a test step in the test case, which should return anything positive, and Delete Priority test step is a test step that will be executed at teat down. if(context.expand("${Addapriority#Response#$.status}") > 400){ vars=testRunner.getTestCase().getTestStepByName("DeletePriority").run(testRunner,context).status; if(s=="OK"){ log.info("Deletedtestdata-Priorityid-"+context.expand("${Addapriority#Response#$.data.id}")); } } Here, the variable s will have the status of the run, and if it is not OK, you may like to add a throw statement, which will break the execution. 2. Setup script for a testsuite To run a testcase at very beginning of a testsuite, which will create some test data. Add that test case to the test suite and disable it. runner.getTestSuite().getTestCaseByName("Setup - Add an article").run(context.properties, false); 3. Assert a value from the response var total_count = context.expand( "${Retrieve cases#Response#$.total_count}" ); var result = true; var entry_id,case_id; for (i = 0;i<total_count;i++){ entry_id = context.expand( "${Retrieve cases#Response#$.data["+i+"].id}" ); case_id = context.expand( "${Add a case#Response#$.data.id}" ); if ( entry_id == case_id){ result = false;break; } } if(result){throw "Assertion Failed"};5.2KViews2likes0CommentsRe: Javascript examples
After investing few hours on this topic, I am able to run few scripts in javascript, they are too basic scripts, but can be used to perform subtle actions. 1. Script to run a test step at testcase tear down - Prerequisites - have a test step inside a testcase and disable it, following testcase teardown script will execute the test step For me, Add a priority is a test step in the test case, which should return anything positive, and Delete Priority test step is a test step that will be executed at teat down. if(context.expand("${Addapriority#Response#$.status}") > 400){ vars=testRunner.getTestCase().getTestStepByName("DeletePriority").run(testRunner,context).status; if(s=="OK"){ log.info("Deletedtestdata-Priorityid-"+context.expand("${Addapriority#Response#$.data.id}")); } } 2. Setup script for a testsuite To run a testcase at very beginning of a testsuite, which will create some test data. Add that test case to the test suite and disable it. runner.getTestSuite().getTestCaseByName("Setup - Add an article").run(context.properties, false); 3. Assert a value from the response var total_count = context.expand( "${Retrieve cases#Response#$.total_count}" ); var result = true; var entry_id,case_id; for (i = 0;i<total_count;i++){ entry_id = context.expand( "${Retrieve cases#Response#$.data["+i+"].id}" ); case_id = context.expand( "${Add a case#Response#$.data.id}" ); if ( entry_id == case_id){ result = false;break; } } if(result){throw "Assertion Failed"};7.3KViews1like1Comment