[JBoss JIRA] (ARQ-1481) Remove redundancy of both ArquillianSputnik and ArquillianSpecification
by Karel Piwko (JIRA)
[ https://issues.jboss.org/browse/ARQ-1481?page=com.atlassian.jira.plugin.s... ]
Karel Piwko commented on ARQ-1481:
----------------------------------
kpiwko: aslak: I'm still working on ArquillianInterceptor for Spock
kpiwko: I think I'm moving in loops. If I put hooks into interceptBeforeSpec() and interceptAfterSpec(), it does not help at all...the problem is that it's +1 and -1 operation, is outcome is always 0, when I'm checking whether I'm in first/last spec
aslak: ha.. of course
aslak:…
[View More] :)
aslak: but the extension has some other spec level doesn't it?
kpiwko: can you elaborate on that?
aslak: kpiwko where you register the Interceptor
kpiwko: in ArquillianSpockExtension
kpiwko: that's the top most object I can get to if I got @ArquillianSpecification way
kpiwko: s/got/go/
kpiwko: and it's created per spec
aslak: when you have a Global extension, you can check if any of the specs contain ArquillianSpecification right?
kpiwko: nope
aslak: ?
kpiwko: global extension has the same scope as annotationdriver extension
aslak: kpiwko what's wrong with this? https://github.com/arquillian/arquillian-testrunner-spock/blob/9749a337f0...
aslak: except it executes Arquillian 'always'
kpiwko: beforeSuite/afterSuite is the same as beforeClass/afterClass
aslak: sory, that's basically the same the current ArquillianExtension
aslak: https://github.com/arquillian/arquillian-testrunner-spock/blob/9749a337f0...
aslak: kpiwko right.. but if the Counter is +1'ed based on # of specs or something, pre calculated
kpiwko: aslak: right
kpiwko: aslak: but that's exactly the problematic part
kpiwko: you don't know how many specs will be executed
kpiwko: as extension is always fired to process the spec
aslak: mm.. so it's VisitSpec -> RunSpec -> VisitSpec -> RunSpec ?
kpiwko: yes
aslak: aa ic
kpiwko: aslak: http://spock-framework.3207229.n2.nabble.com/How-to-emulate-BeforeSuite-A...
aslak: then.. BeforeSuite on first spec with @ArquillianSpecification? or i guess it won't be called for non @ArquillianSpecification annotated classes.. then register a ShutdownHook for AfterSuite
kpiwko: aslak: that might work
kpiwko: yes
kpiwko: but I wanted to avoid shutdown hook
kpiwko: because I have no idea what happens if you start forking
aslak: forking what? vm pr test ?
kpiwko: for instance, if you don't fork with surefire, shutdown hook would be called after maven process is down, not after surefire is down, right?
aslak: aa, yea.. good point
kpiwko: so, the only solution I was able to work out was to c&p what's there for arquillian junit
kpiwko: hook into testrunner creation
kpiwko: given that Sputnik is not really extensible easily, I had to recopy most of its code https://github.com/arquillian/arquillian-testrunner-spock/blob/master/cor...
aslak: last i checked 'not forking' surefire was not an options as it cause dsome classloader issues.. but that's a different story
kpiwko: current master finally does what you'd expect
aslak: hmm
aslak: kpiwko no, then i don't know. i thought the visitSpec ones were all called before run
aslak: like in junit
aslak: my bad :)
kpiwko: unfortunately, they are not
> Remove redundancy of both ArquillianSputnik and ArquillianSpecification
> -----------------------------------------------------------------------
>
> Key: ARQ-1481
> URL: https://issues.jboss.org/browse/ARQ-1481
> Project: Arquillian
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Spock TestRunner
> Affects Versions: spock_1.0.0.Beta1
> Reporter: Karel Piwko
> Assignee: Karel Piwko
>
> It should be possible to remove @ArquillianSpecification, as it is redundant to @RunWith call.
> {code}
> @ArquillianSpecification
> @RunWith(ArquillianSputik)
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[View Less]
11 years, 4 months
[JBoss JIRA] (ARQ-1273) Reinstalling of android-server in android-drone fails when other version is specified
by Stefan Miklosovic (JIRA)
[ https://issues.jboss.org/browse/ARQ-1273?page=com.atlassian.jira.plugin.s... ]
Stefan Miklosovic closed ARQ-1273.
----------------------------------
> Reinstalling of android-server in android-drone fails when other version is specified
> -------------------------------------------------------------------------------------
>
> Key: ARQ-1273
> URL: https://issues.jboss.org/browse/ARQ-1273
> Project: Arquillian
> …
[View More]Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: Extension - Android
> Affects Versions: 1.0.0.Final
> Reporter: Stefan Miklosovic
> Assignee: Stefan Miklosovic
> Priority: Optional
>
> Since there is the possibility to have an Android virtual device connected and online while doing some tests so starting up the emulator is not neccessary every time one is testing something, the android-drone module installs (and reinstalls) an android-server.apk on the device in order to prepare it for e.g testing via android-extension-drone.
> When running the test, specifying one version of the apk server (e.g. 2.16), this APK is installed. In the case we are executing the test the second time with the same version of the APK, all is good since the APK is just reinstalled.
> The error arise when we are trying to reinstall the APK when other version of the server is specified (e.g. 2.21.0) because it seems that Android checks upon reinstalling if the certificates of APK files match and in this case, it is not true. The next error appears while doing so:
> {code}org.jboss.arquillian.android.api.AndroidExecutionException: Unable to install APK from (path)/android-server-2.21.0.apk.
> Command failed with status code: INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES
> at org.jboss.arquillian.android.impl.AndroidDeviceImpl.installPackage(AndroidDeviceImpl.java:169)
> at org.jboss.arquillian.android.drone.impl.AndroidWebDriverSupport.prepareWebDriverEnvironment(AndroidDroneWebDriverSupport.java:66)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
> at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
> at org.jboss.arquillian.android.impl.AndroidDeviceSelector.getOrCreateAndroidDevice(AndroidDeviceSelector.java:110)
> {code}
> I would suggest to not only reinstall the package, which is not sufficient,
> but I would check if some package of some particular name is installed and
> after that it should be removed explicitly.
> The command which writes out the list of all installed applications is
> {code}pm list packages -f{code}
> so this can be easilly checked and tested for the presence of the string
> {code}package:/data/app/org.openqa.selenium.android.app-1.apk=org.openqa.selenium.android.app{code}
> or its appropriate part.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[View Less]
11 years, 4 months
[JBoss JIRA] (ARQ-1273) Reinstalling of android-server in android-drone fails when other version is specified
by Stefan Miklosovic (JIRA)
[ https://issues.jboss.org/browse/ARQ-1273?page=com.atlassian.jira.plugin.s... ]
Stefan Miklosovic reassigned ARQ-1273:
--------------------------------------
Assignee: Stefan Miklosovic (was: Karel Piwko)
> Reinstalling of android-server in android-drone fails when other version is specified
> -------------------------------------------------------------------------------------
>
> Key: ARQ-1273
> URL: https://issues.jboss.org/browse/…
[View More]ARQ-1273
> Project: Arquillian
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: Extension - Android
> Affects Versions: 1.0.0.Final
> Reporter: Stefan Miklosovic
> Assignee: Stefan Miklosovic
> Priority: Optional
>
> Since there is the possibility to have an Android virtual device connected and online while doing some tests so starting up the emulator is not neccessary every time one is testing something, the android-drone module installs (and reinstalls) an android-server.apk on the device in order to prepare it for e.g testing via android-extension-drone.
> When running the test, specifying one version of the apk server (e.g. 2.16), this APK is installed. In the case we are executing the test the second time with the same version of the APK, all is good since the APK is just reinstalled.
> The error arise when we are trying to reinstall the APK when other version of the server is specified (e.g. 2.21.0) because it seems that Android checks upon reinstalling if the certificates of APK files match and in this case, it is not true. The next error appears while doing so:
> {code}org.jboss.arquillian.android.api.AndroidExecutionException: Unable to install APK from (path)/android-server-2.21.0.apk.
> Command failed with status code: INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES
> at org.jboss.arquillian.android.impl.AndroidDeviceImpl.installPackage(AndroidDeviceImpl.java:169)
> at org.jboss.arquillian.android.drone.impl.AndroidWebDriverSupport.prepareWebDriverEnvironment(AndroidDroneWebDriverSupport.java:66)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
> at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
> at org.jboss.arquillian.android.impl.AndroidDeviceSelector.getOrCreateAndroidDevice(AndroidDeviceSelector.java:110)
> {code}
> I would suggest to not only reinstall the package, which is not sufficient,
> but I would check if some package of some particular name is installed and
> after that it should be removed explicitly.
> The command which writes out the list of all installed applications is
> {code}pm list packages -f{code}
> so this can be easilly checked and tested for the presence of the string
> {code}package:/data/app/org.openqa.selenium.android.app-1.apk=org.openqa.selenium.android.app{code}
> or its appropriate part.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[View Less]
11 years, 4 months
[JBoss JIRA] (ARQ-1273) Reinstalling of android-server in android-drone fails when other version is specified
by Stefan Miklosovic (JIRA)
[ https://issues.jboss.org/browse/ARQ-1273?page=com.atlassian.jira.plugin.s... ]
Stefan Miklosovic resolved ARQ-1273.
------------------------------------
Resolution: Done
Done in Arquillian Droidium project
> Reinstalling of android-server in android-drone fails when other version is specified
> -------------------------------------------------------------------------------------
>
> Key: ARQ-1273
> URL: https://issues.…
[View More]jboss.org/browse/ARQ-1273
> Project: Arquillian
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: Extension - Android
> Affects Versions: 1.0.0.Final
> Reporter: Stefan Miklosovic
> Assignee: Stefan Miklosovic
> Priority: Optional
>
> Since there is the possibility to have an Android virtual device connected and online while doing some tests so starting up the emulator is not neccessary every time one is testing something, the android-drone module installs (and reinstalls) an android-server.apk on the device in order to prepare it for e.g testing via android-extension-drone.
> When running the test, specifying one version of the apk server (e.g. 2.16), this APK is installed. In the case we are executing the test the second time with the same version of the APK, all is good since the APK is just reinstalled.
> The error arise when we are trying to reinstall the APK when other version of the server is specified (e.g. 2.21.0) because it seems that Android checks upon reinstalling if the certificates of APK files match and in this case, it is not true. The next error appears while doing so:
> {code}org.jboss.arquillian.android.api.AndroidExecutionException: Unable to install APK from (path)/android-server-2.21.0.apk.
> Command failed with status code: INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES
> at org.jboss.arquillian.android.impl.AndroidDeviceImpl.installPackage(AndroidDeviceImpl.java:169)
> at org.jboss.arquillian.android.drone.impl.AndroidWebDriverSupport.prepareWebDriverEnvironment(AndroidDroneWebDriverSupport.java:66)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
> at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
> at org.jboss.arquillian.android.impl.AndroidDeviceSelector.getOrCreateAndroidDevice(AndroidDeviceSelector.java:110)
> {code}
> I would suggest to not only reinstall the package, which is not sufficient,
> but I would check if some package of some particular name is installed and
> after that it should be removed explicitly.
> The command which writes out the list of all installed applications is
> {code}pm list packages -f{code}
> so this can be easilly checked and tested for the presence of the string
> {code}package:/data/app/org.openqa.selenium.android.app-1.apk=org.openqa.selenium.android.app{code}
> or its appropriate part.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[View Less]
11 years, 4 months