Setup

Prerequisites

  1. A supported version of Java.

  2. Google Chrome.

  3. Gradle or Gradle Wrapper 6.6.1 or higher.

Setting up the Poshi Standalone Gradle Project

  1. Create a new directory, example poshi-standalone.

  2. Setup Gradle wrapper (6.6.1 +) in the newly created directory.

    $ gradle wrapper --gradle-distribution-url https://github.com/liferay/liferay-binaries-cache-2020/raw/master/gradle-6.6.1.LIFERAY-PATCHED-1-bin.zip
    

    Your directory should now contain the following:

    poshi-standalone
    ├── .gradle
    ├── gradle
    |   └── wrapper
    |       ├──  gradle-wrapper.jar
    |       └──  gradle-wrapper.properties
    ├── gradlew
    └── gradlew.bat
    
  3. To fetch the Poshi Standalone build files, run the following command from the desired directory in a terminal/command line window:

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/liferay/liferay-portal/master/modules/test/poshi/poshi-standalone/setup.sh)"
    

    In addition to the initial gradle files, your directory should now have the following: build.gradle, settings.gradle, poshi.properties, and poshi-ext.properties

  4. On the root directory, create a new folder poshi-tests. This will house the files needed for the test.

  5. Navigate to the poshi-tests directory and create three additional folders for paths, macros, and testcases.

    Your directory should now contain the following:

    poshi-standalone
    ├── .gradle
    ├── gradle
    ├── gradle
    |   └── wrapper
    |       ├──  gradle-wrapper.jar
    |       └──  gradle-wrapper.properties
    ├── poshi-tests
    |   ├── macros
    |   ├── paths
    |   └── testcases
    ├── build.gradle
    ├── gradlew
    ├── gradlew.bat
    ├── poshi.properties
    ├── poshi-ext.properties
    └── settings.gradle
    

With this setup, you can run ./gradlew task (gradlew.bat task for Windows) to view available tasks on the project. For more information on the Gradle configurations for Poshi Standalone, see Poshi Standalone on the Liferay github repository.

Updating Poshi Standalone

Poshi Standalone will always run the latest released version and there are no extra steps needed to update the gradle project. Should you need to downgrade, add the following lines to the end of the build.gradle file, replacing the version number with the desired version from the Poshi Runner Changelog.

poshiRunner {
    version = "1.0.xxx"
}

Capabilities

Product

Contact Us

Connect

Powered by Liferay
© 2024 Liferay Inc. All Rights Reserved • Privacy Policy