0
 if (Environment.current == Environment.TEST)

I am trying to upgrade Grails 2.4 to 3.3.6 and not able to change environments: from Development to test, Can someone help me?

Lajos Arpad
  • 64,414
  • 37
  • 100
  • 175
shrikant joshi
  • 494
  • 4
  • 12

2 Answers2

1

You can pass the environment when your start the application.

grails -Dgrails.env=TEST run-app

Check this

Cristian Riță
  • 561
  • 3
  • 13
0

I was doing only copy and paste my controllers and services so there is no run configuration was created by default. I just go to IntelliJ--Run--Edit configuration and added the information as per the screenshot.enter image description here

shrikant joshi
  • 494
  • 4
  • 12