Controller test support for Spring #178

Merged
merged 10 commits into from Jun 3, 2016

Projects

None yet

4 participants

@hendrikebbers
Member
hendrikebbers commented May 20, 2016 edited

I merged my old test approach in the new structure. With this version all tests are running. There is still an issue with the event bus (Thread.sleep is needed) but this should be refactored when we refactor the event bus.
The new module provides test support for Unit and TestNG. As a next step this can be splitted in 3 Parts:

  • basic test support classes
  • JUnit support
  • TestNG support

This change is Reviewable

hendrikebbers added some commits May 20, 2016
@hendrikebbers hendrikebbers test support de136bd
@hendrikebbers hendrikebbers test running
1df83c8
hendrikebbers added some commits May 20, 2016
@hendrikebbers hendrikebbers License header
a679e00
@hendrikebbers hendrikebbers removed lambda
b7278ad
@coveralls

Coverage Status

Coverage increased (+8.2%) to 73.348% when pulling b7278ad on merge-test-support into ae141a6 on master.

@hendrikebbers hendrikebbers added this to the 0.8.6 milestone May 20, 2016
@hendrikebbers hendrikebbers Merge branch 'master' into merge-test-support
ab52914
@coveralls

Coverage Status

Coverage increased (+8.2%) to 73.348% when pulling ab52914 on merge-test-support into 7da209b on master.

hendrikebbers added some commits May 31, 2016
@hendrikebbers hendrikebbers Documentation
0c9af4e
@hendrikebbers hendrikebbers doc
52c1e13
@coveralls

Coverage Status

Coverage increased (+8.2%) to 73.348% when pulling 52c1e13 on merge-test-support into 7da209b on master.

@hendrikebbers hendrikebbers removed comments
f71d457
@coveralls

Coverage Status

Coverage increased (+8.2%) to 73.337% when pulling f71d457 on merge-test-support into 7da209b on master.

@hendrikebbers hendrikebbers Merge branch 'master' into merge-test-support
# Conflicts:
#	platform/dolphin-platform-server-spring/src/main/java/com/canoo/dolphin/server/spring/SpringContainerManager.java
3f490d6
@hendrikebbers
Member

Merged Master in Branch

@AndreasEhret

Review status: 0 of 20 files reviewed at latest revision, 1 unresolved discussion, some commit checks failed.


platform-extras/dolphin-platform-spring-controller-tester/src/main/java/com/canoo/dolphin/test/ControllerUnderTest.java, line 19 [r4] (raw file):

import com.canoo.dolphin.client.Param;

Add javadoc


Comments from Reviewable

@AndreasEhret

Review status: 0 of 20 files reviewed at latest revision, 2 unresolved discussions, some commit checks failed.


platform-extras/dolphin-platform-spring-controller-tester/src/main/java/com/canoo/dolphin/test/SpringJUnitControllerTest.java, line 34 [r4] (raw file):

@WebAppConfiguration
@SpringApplicationConfiguration(classes = DolphinPlatformSpringTestBootstrap.class)
public class SpringJUnitControllerTest extends AbstractJUnit4SpringContextTests implements ControllerTest{

make this class abstract


Comments from Reviewable

@AndreasEhret

Review status: 0 of 20 files reviewed at latest revision, 3 unresolved discussions, some commit checks failed.


platform-extras/dolphin-platform-spring-controller-tester/src/main/java/com/canoo/dolphin/test/SpringJUnitControllerTest.java, line 54 [r4] (raw file):

                        proxy.invoke(actionName, params).get();
                    } catch (Exception e) {
                        throw new ControllerTestException("Error in action", e);

change comment in something like "Error in action invocation"


Comments from Reviewable

@AndreasEhret

Review status: 0 of 20 files reviewed at latest revision, 4 unresolved discussions, some commit checks failed.


platform-extras/dolphin-platform-spring-controller-tester/src/main/java/com/canoo/dolphin/test/SpringTestNGControllerTest.java, line 54 [r4] (raw file):

                        proxy.invoke(actionName, params).get();
                    } catch (Exception e) {
                        throw new ControllerTestException("Error in action", e);

change comment in something like "Error in action invocation"


Comments from Reviewable

@AndreasEhret

Review status: 0 of 20 files reviewed at latest revision, 5 unresolved discussions, some commit checks failed.


platform-extras/dolphin-platform-spring-controller-tester/src/main/java/com/canoo/dolphin/test/impl/DolphinTestContext.java, line 32 [r4] (raw file):

 * Created by hendrikebbers on 20.05.16.
 */
public class DolphinTestContext extends DolphinContext {

remove created


Comments from Reviewable

@AndreasEhret

Review status: 0 of 20 files reviewed at latest revision, 6 unresolved discussions, some commit checks failed.


platform-extras/dolphin-platform-spring-controller-tester/src/main/java/com/canoo/dolphin/test/impl/DolphinTestContext.java, line 60 [r4] (raw file):

            public DefaultServerDolphin create() {
                DefaultServerDolphin defaultServerDolphin =  config.getServerDolphin();
                return defaultServerDolphin;

inline variable


Comments from Reviewable

@AndreasEhret

Review status: 0 of 20 files reviewed at latest revision, 7 unresolved discussions, some commit checks failed.


platform-extras/dolphin-platform-spring-controller-tester/src/main/java/com/canoo/dolphin/test/impl/TestDolphinFactory.java, line 24 [r4] (raw file):

/**
 * Created by hendrikebbers on 05.02.16.

remove created


Comments from Reviewable

@AndreasEhret

Review status: 0 of 20 files reviewed at latest revision, 8 unresolved discussions, some commit checks failed.


platform-extras/dolphin-platform-spring-controller-tester/src/test/java/com/canoo/dolphin/test/TestNGDemoTest.java, line 97 [r4] (raw file):

        controller.invoke("sendEvent");

        //Still a workaround to wait till next request

add reference to issue #64 into comment


Comments from Reviewable

@AndreasEhret

Reviewed 13 of 25 files at r1, 5 of 5 files at r2, 1 of 2 files at r3, 1 of 5 files at r4.
Review status: all files reviewed at latest revision, 8 unresolved discussions, some commit checks failed.


Comments from Reviewable

@hendrikebbers hendrikebbers merged master in branch
8de68c6
@hendrikebbers hendrikebbers merged commit ce439a2 into master Jun 3, 2016

0 of 3 checks passed

code-review/reviewable 51 files, 8 discussions left (AndreasEhret, hendrikebbers)
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/travis-ci/push The Travis CI build is in progress
Details
@hendrikebbers hendrikebbers deleted the merge-test-support branch Jun 3, 2016
@aalmiray aalmiray removed the in progress label Jun 3, 2016
@coveralls

Coverage Status

Coverage increased (+5.7%) to 70.404% when pulling 8de68c6 on merge-test-support into ecd654b on master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment