niedziela, 27 października 2013

Spock, TestNG and Maven Surefire

If you want to run Spock and TestNG tests together in Maven on standard configuration you'd receive:

Configuring TestNG with: TestNGMapConfigurator
org.testng.TestNGException: 
Failure in JUnit mode for class com.XXX: could not create/run JUnit test suite: 
Cannot find JUnit method class junit.framework.TestSuite$1.warning
at org.testng.junit.JUnitTestRunner.runFailed(JUnitTestRunner.java:237)
at org.testng.junit.JUnitTestRunner.start(JUnitTestRunner.java:230)
at org.testng.junit.JUnitTestRunner.run(JUnitTestRunner.java:211)
at org.testng.TestRunner$1.run(TestRunner.java:667)
at org.testng.TestRunner.runWorkers(TestRunner.java:1178)
at org.testng.TestRunner.privateRunJUnit(TestRunner.java:698)
at org.testng.TestRunner.run(TestRunner.java:605)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
at org.testng.SuiteRunner.run(SuiteRunner.java:240)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1158)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1083)
at org.testng.TestNG.run(TestNG.java:999)
at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:91)
at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.executeMulti(TestNGDirectoryTestSuite.java:211)
at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:107)
at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:113)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)

The solution is to replace your surefire plugin with the following in pom.xml:

<plugin>                                                              
    <groupId>org.apache.maven.plugins</groupId>                       
    <artifactId>maven-surefire-plugin</artifactId>                    
    <version>2.16</version>                                           
    <configuration>                                                   
        <excludes>                                                    
            <exclude>**/SpockTests/*Test.java</exclude>                     
        </excludes>                                                   
    </configuration>                                                  
    <executions>                                                      
        <execution>                                                   
            <id>integration-test</id>                                 
            <goals>                                                   
                <goal>test</goal>                                     
            </goals>                                                  
            <phase>test</phase>                                       
            <configuration>                                           
                <testNGArtifactName>none:none</testNGArtifactName>    
                <junitArtifactName>junit:junit-dep</junitArtifactName>
                <excludes>                                            
                    <exclude>none</exclude>                           
                </excludes>                                           
                <includes>                                            
                    <include>**/SpockTests/*Test.java</include>             
                </includes>                                           
            </configuration>                                          
        </execution>                                                  
    </executions>                                                     
</plugin>                                                                                                      

wtorek, 19 lutego 2013

Funpage czy fanpage

Poprawna forma to zdecydowanie fanpage jeśli chodzi o Facebooka.

Z angielskiego:
  • fun - zabawa
  • fan - fan lub wentylator

i++ j++ k++ incrementation in VBA

Unfortunately there is no i++ in VBA.
Only legitimate way is to write
i = i +1

Collection as return type in VBA

You cannot use New in function declaration.

Set functionName = New Collection is needed

Pętla while w VBA

Jej składnia to:

While warunek
...
Wend

sobota, 16 lutego 2013

.CSV Placement in Android App

Where to put .CSV file in your Android application? Best place is res/raw folder.

poniedziałek, 11 lutego 2013

Videotalks on HTC Desire

Unfortunately they are not possible :(

Wideorozmowy HTC Desire

Niestety wideorozmowy nie są możliwe na HTC Desire z uwagi na brak przedniej kamerki.

Failed to fetch URL http://dl-ssl.google.com/android/repository/addons_list-2.xml, reason: Unknown Host dl-ssl.google.com

Resolution: provide your proxy in application.

Godziny Otwarcia poczta Torfowa 1, Kobierzyńska


Poczta Polska
AP Kraków - ul. Torfowa 1, przy ulicy Kobierzyńskiej, niedaleko przystanku Torfowa

godziny otwarcia: 09:45-14:45 oraz 15:15-18:30; w soboty i niedziele nieczynne

How to draw rectangle in GIMP?

Simply make rectangle selection and fill it with color. In case you want only borders, right-click on selection, select Edit and then Stroke Selection...

Jaka rzeka przepływa przez Olkusz?

Swoje źródła ma tu rzeka Baba.

Jaka rzeka przepływa przez Kraków?

Jest to Wisła oraz kilka innych, mniejszych.

Święta Lena

Co prawda świętej o imieniu Lena nie było, ale z powodzeniem można uznać, że jest to tylko zdrobnienie od imienia Helena, więc z powodzeniem można uznać, że patronką każdej Leny jest Święta Helena – cesarzowa, święta Kościoła katolickiego i prawosławnego.

Kuboj

Kuboj w gwarze z okolic Zawiercia, Myszkowa i ogólnie Zagłębia Dąbrowskiego jest to po prostu... kaptur. Nigdzie indziej w Polsce to słowo nie jest znane.

Recolor and Brightness Together and Simultaneously - PowerPoint

Unfortunately there is no possibility to apply brightness and recolor at the same time in PowerPoint 2007 :(

List formalny - podziękowanie za odpowiedź

Powinno być: Thank you for your reply.

Rozmar śruby w kranie

Nie ma uniwersalnego rozmiaru śruby w kranie. Ale jeśli próbujesz odręcić kran od dołu, to poszukaj najpierw śruby od góry. Musi gdzieś być i często jest to np. imbus za plastikową zaślepką.

Tańsza Castorama czy Leroy Merlin?

Po wielu porównaniach dostępnych w internecie jakie przeanalizowałem wynika że Castorama moim zdaniem jest tańsza niż Leroy Merlin oraz Brico Marche.

Czy jest święta Maja?

Imię Maja można traktować jako forma imienia Maria. Patronką każdej Mai może być więc Maria, matka Jezusa Chrystusa.