Integration tests : update documentation

Hi,

Spent quite a few time trying to set up first integration test.

Please update the documentation here : https://doc.cuba-platform.com/manual-6.6/integration_tests_mw.html.


appPropertiesFiles = Arrays.asList(
                // List the files defined in your web.xml
                // in appPropertiesConfig context parameter of the core module
                "sales-app.properties",
                // Add this file which is located in CUBA and defines some properties
                // specifically for test environment. You can replace it with your own
                // or add another one in the end.
                "test-app.properties");

This will not yield a working test container. To make it work “cuba-app.properties” should be added as it is specified in the integration tests of the new Sales sample project.

And cuba-app.properties file is not in core web.xml so the comment “List the files defined in your web.xml appPropertiesConfig context parameter of the core module” should be clarified/completed.

EDIT : below what works.


appPropertiesFiles = Arrays.asList(
                    // List the files defined in your web.xml
                    // in appPropertiesConfig context parameter of the core module
                    "cuba-app.properties",
                    "classpath:com/busy/app/app.properties",
                    // Add this file which is located in CUBA and defines some properties
                    // specifically for test environment. You can replace it with your own
                    // or add another one in the end.
                    "test-app.properties");

With this code test container loads ok , and properties files are correctly found and loaded.

Mike

Hi Mike,

You refer to the documentation on version 6.6, and it is correct for projects based on this version, due to this change: https://youtrack.cuba-platform.com/issue/PL-9048. It is also mentioned in the release notes.

Are you sure you use platform 6.6?

Studio 6.6.0, platform 6.6.1.

Removed cuba-app.properties from web.xml and from TestContainer init, probably the migration did not take care about doing it. Anyway it works now.

Thanks Konstantin