RobotiumTech / robotium

Android UI Testing
http://www.robotium.org
Apache License 2.0
2.86k stars 786 forks source link

Robotium Recorder CRASH on save #716

Closed renas closed 9 years ago

renas commented 9 years ago

From andreas....@gmail.com on November 09, 2014 23:04:49

What steps will reproduce the problem? 1. Start Robotium Recorder

  1. Select an apk or module and click next
  2. Click "New Robotium Test"
  3. Record a simple test e.g. Open and Close Navigation Drawer
  4. Click "Stop"
  5. Click "Save"
  6. Give your test a name
  7. Click "OK", Nothing happens and I get a crash in the IDE What is the expected output? What do you see instead? The "Save test"-dialog should close and the test should be saved when the user clicks OK in the dialog. What version of the product are you using? On what operating system? Android Studio (Beta) 0.8.14 Robotium Recorder 1.0.30 Please provide any additional information below. It seems like it is a NullPointerException that is causing this issue. Here is the stack trace of the crash in Android Studio:

null java.lang.NullPointerException at com.robotium.recorder.b.c.e.e.a(e.java) at com.robotium.recorder.b.c.e.e.b(e.java) at com.robotium.recorder.b.c.e.e.c(e.java) at com.robotium.recorder.b.c.e.e.a(e.java) at com.robotium.recorder.b.g.g(g.java) at com.robotium.recorder.b.g.e(g.java) at com.robotium.recorder.intellij.wizard.ad.a(ad.java) at com.robotium.recorder.intellij.wizard.aN.a(aN.java) at com.robotium.recorder.intellij.wizard.aN.c(aN.java) at com.robotium.recorder.intellij.wizard.aB.actionPerformed(aB.java) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2351) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236) at java.awt.Component.processMouseEvent(Component.java:6414) at javax.swing.JComponent.processMouseEvent(JComponent.java:3275) at java.awt.Component.processEvent(Component.java:6179) at java.awt.Container.processEvent(Container.java:2084) at java.awt.Component.dispatchEventImpl(Component.java:4776) at java.awt.Container.dispatchEventImpl(Container.java:2142) at java.awt.Component.dispatchEvent(Component.java:4604) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4618) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4279) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4209) at java.awt.Container.dispatchEventImpl(Container.java:2128) at java.awt.Window.dispatchEventImpl(Window.java:2492) at java.awt.Component.dispatchEvent(Component.java:4604) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:717) at java.awt.EventQueue.access$400(EventQueue.java:82) at java.awt.EventQueue$2.run(EventQueue.java:676) at java.awt.EventQueue$2.run(EventQueue.java:674) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:97) at java.awt.EventQueue$3.run(EventQueue.java:690) at java.awt.EventQueue$3.run(EventQueue.java:688) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86) at java.awt.EventQueue.dispatchEvent(EventQueue.java:687) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:697) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:520) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:335) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:205) at java.awt.Dialog$1.run(Dialog.java:1049) at java.awt.Dialog$3.run(Dialog.java:1101) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Dialog.show(Dialog.java:1099) at java.awt.Component.show(Component.java:1615) at java.awt.Component.setVisible(Component.java:1567) at java.awt.Window.setVisible(Window.java:846) at java.awt.Dialog.setVisible(Dialog.java:984) at com.robotium.recorder.intellij.wizard.aG.a(aG.java) at com.robotium.recorder.intellij.wizard.aj.actionPerformed(aj.java) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2351) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236) at java.awt.Component.processMouseEvent(Component.java:6414) at javax.swing.JComponent.processMouseEvent(JComponent.java:3275) at java.awt.Component.processEvent(Component.java:6179) at java.awt.Container.processEvent(Container.java:2084) at java.awt.Component.dispatchEventImpl(Component.java:4776) at java.awt.Container.dispatchEventImpl(Container.java:2142) at java.awt.Component.dispatchEvent(Component.java:4604) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4618) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4279) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4209) at java.awt.Container.dispatchEventImpl(Container.java:2128) at java.awt.Window.dispatchEventImpl(Window.java:2492) at java.awt.Component.dispatchEvent(Component.java:4604) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:717) at java.awt.EventQueue.access$400(EventQueue.java:82) at java.awt.EventQueue$2.run(EventQueue.java:676) at java.awt.EventQueue$2.run(EventQueue.java:674) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:97) at java.awt.EventQueue$3.run(EventQueue.java:690) at java.awt.EventQueue$3.run(EventQueue.java:688) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86) at java.awt.EventQueue.dispatchEvent(EventQueue.java:687) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:697) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:520) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:335) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:205) at java.awt.Dialog$1.run(Dialog.java:1049) at java.awt.Dialog$3.run(Dia...

Original issue: http://code.google.com/p/robotium/issues/detail?id=637

renas commented 9 years ago

From andreas....@gmail.com on November 10, 2014 00:06:09

I'm running on the latest version of Mac OS X

renas commented 9 years ago

From renasr...@gmail.com on November 10, 2014 15:19:14

Thanks a lot for reporting this. We have uploaded 1.0.31. Please let me know if it works now.

Status: Accepted
Owner: renasr...@gmail.com

renas commented 9 years ago

From andreas....@gmail.com on November 10, 2014 23:42:52

I have now updated to 1.0.31 and it works like a charm. Thanks a lot for the quick fix. One thing is that you have to synchronize the test folder in Android Studio for the new test to appear, but that perhaps is a limitation of Android Studio and not Robotium. Great Work!

renas commented 9 years ago

From renasr...@gmail.com on November 11, 2014 06:51:56

Thanks for the feedback!

Status: Verified