This is a general info updated based on the following meeting notes: 

Note:  

Ralph Navarro is the original generator. This doc may serve as a general reference for people who need to install/update their Intelliji IDEA in the future.
It is a living doc and welcome any one in the TSSG team to update/Modify as needed. 


General procedures for install software related to Intelliji IDEA
0. Install Java version 8 on windows (We may support higher Java version)
      Edit System Environment Variables: 
       a. Add variables: JAVA_HOME 
       b. Add path: c:\Program Files\Java
1. Install IntelliJ IDEA Community Edition for Windows
2. Install related software packages In docker:
     a. get sdkman first:
     curl -s "https://get.sdkman.io" | bash
      b. Install groovy with desired version (sdk list groovy )
           sdk install grovvy 2.5.3 (example)
      c. Install gradle with desired version (sdk list gradle)
          sdk install gradle 5.6.4 (example)
3. Import from source: the tssgTech local git repository
4. Import Gradle Module.
       a. Right click on tssgTech/tests/GebAndSpock/build.gradle
       b. In popup menu, select Import Gradle Module (about 70% down the list)
       c. In status bar (bottom of IDEA window), wait for import and index.
       d. Gradle tab will show up on right side of IDEA window.
5. Setup multipage branch
       a. In IDEA window, bottom right corner, click on Git: <branch>
       b. Select the remote branch multipage
       c. In the popup, name the local branch multipage
6. Configure IDEA to run the Gradle chromeTest task
     Create a Gradle Environment Configuration
     a. In Edit Configuration dropdown (top right area of IDEA window), click drop down          and select Edit Configuration
     b. In Popup, on top left, click '+' and select Gradle
     c. Give the Gradle environment a name (e.g. Run chromeTest)
     d. Select Gradle project: tssgTech/tests/GebAndSpock
     e. In Tasks, enter chromeTest
      f. Click OK button in bottom right of popup.
7. Run Geb and Spock tests in Selenium Grid
      a. This is the default configuration in src/test/resources/GebConfig.groovy
      b. In the chromeTest environment, select the green play button 
8. Configure Geb and Spock to run tests locally
       a. n src/test/resources/GebConfig.groovy, chrome {} section,
          comment out the entire section driver = {} that starts with DesiredCapabilities
       b. Un-comment:  driver = { new ChromeDriver() }
9. Run Geb and Spock tests Locally.
       a. Run the Gradle environment you created earlier.
       b. Select the green play button 
10. Review test reports
      a. in GebAndSpock/build/reports/chromeTest/
            i. tests/index.html    # contains report as html
            ii. geb/Tests/TSSGTechSpec   # contains screenshots
11. Others:  IntelliJ IDEA 
      a. Menu: File → Settings → Tools → Terminal → Shell path
       On Windows + Docker Toolbox: Set to the same configuration as the Quickstart             Terminal shortcut's properties launch command line.
       On Linux: Set to location of bash (e.g. /bin/bash)
      b. Menu:  File -> Settings -> Build, Execution, Deployment:

      Gradle:  Gradle Projects -> GebAndSpoke -> Build and run using: Intelliji IDEA |

      Run tests using: Intelliji IDEA

  • No labels