Menu

#77 Using Spock Framework and AssertJ Swing for acceptance and unit testing

0.8.0
in-progress
False
Task
2024-11-12
2024-11-02
No

The combination of Spock framework and AssertJ Swing is a fitting solution for automated testing of Freeplane. Spock Framework uses Groovy to define test specification. It allows a proper structure and documentation of the test cases. It enables access to the Freeplan API and AssertJ Swing enables acces to the Freeplane GUI. In that way it is suitable for acceptance testing. At the same time it also enables unit and integration testing with stubs and mocks (that is where it is actually meant for). This also facilitates test driven development.

This task aims to track actions and wishes with regard to implementing automated testing with Spock framework.

Discussion

  • Henk van den Akker

    Todo

    • Check if I can select a node through the Freeplane API -> yes: c.select(Node)
    • Create a TestUtilities class
    • Create a TestUtilities method for creating new mind maps
    • Navragen hoe SwingExplorer of SwingSpector te gebruiken met Freeplane
    • Research whether freeplane_root project can be excluded from compiling every time -> planned redo task 65 to resolve this
    • Adapted Freeplane Gradle plugin to add scriptsImplementation separate from testImplementation
    • Make separate test configurations for acceptance test and test library
    • Setup root directory for execution and for temporary files (reporting, screenshots, output). Check how Spock handles temporary files.
    • Setup further directories for execution and move them to output afterwards
    • Check how to set up reporting for Spock framework
    • Add sreenshots an add them to the reporting
    • Check which groovy libraries Spock framework uses

    Wishlist

    • Test moving starting up Freeplane to setupSpec() for starting Freeplane if it's too slow for every feature methode -> variables need to be static and/or @shared
    • Automated testing for different versions of Freeplane, study https://java.testcontainers.org/
     

    Last edit: Henk van den Akker 2024-11-17
  • Henk van den Akker

    • labels: release-independent, development --> development, refactoring
    • status: in-progress --> pending
    • Milestone: none --> 0.8.0
     
  • Henk van den Akker

    • status: pending --> in-progress
     

Log in to post a comment.

MongoDB Logo MongoDB