Questions tagged [grails-test]

Use this tag when making Grails testing from low level unit testing to high level functional tests.

Automated testing is a key part of Grails. Hence, Grails provides many ways to making testing easier from low level unit testing to high level functional tests.

Docs : https://docs.grails.org/latest/guide/testing.html

8 questions
2
votes
2 answers

Spock - mocking external service

I'm very new in spock framework testing and I didn't find any example where I can find needed information. Therefore, I think the best way is to show an example what I need to have. e.g. test class in spock: def "getData" (){ // this is test of…
user3506652
  • 43
  • 1
  • 2
  • 8
1
vote
3 answers

Grails Service Transactions

I'm trying to get transactions working within a Grails service, but I'm not getting the results I'm expecting. Can someone tell me if I'm doing something wrong, if my assumptions are off? My domain class: class Account { static constraints = { …
Thody
  • 1,960
  • 3
  • 23
  • 31
0
votes
1 answer

Grails test-app fails while test-app individual unite test works

I have got a Grails 3.3.5 application with several Unit tests. While I run this tests individually they run as expected, but when I run a general test-app the tests fails with this message: …
Fran
  • 41
  • 6
0
votes
2 answers

Get config of other environment in Grails 2.*

I'm running Grails 2.1.1, and i'm looking for a way to get the value of variable set in production while i'm running on test environment. The config file : development { config.url = "http://local" } test { config.url =…
Hassan ALAMI
  • 318
  • 1
  • 5
  • 18
0
votes
1 answer

How to write testcase in Ruby on Rails

I am newbie in Rails test. so how can I start my testing. Anyone Knows better tutorial for Rails testing.
Raj
  • 66
  • 9
0
votes
1 answer

How to call a method from domain class when testing in Grails?

I have a static method written in my domain class , which I have to test in my Grails test. Now how to call that method from domain class. That static method will fetch some data from my db and will return it.
0
votes
0 answers

Grails problems with testing: setup and cleanup , not quite cleaning up

I have a integration test where I am testing some business logic methods that run between two of my domain objects. Because I have multiple test that create the same set of objects to run my tests under different conditions, I create the domain…
GGizmos
  • 3,443
  • 4
  • 27
  • 72
0
votes
1 answer

Grails 3 with Geb fails on "angular-moment"

I am trying to setup Geb with Grails 3. (I am running it from Intellij) We are currently implementing an api without any ux. For us it's enough to test REST API requests. I start the tests via test-app as I can see in the console log. The…
Amio.io
  • 20,677
  • 15
  • 82
  • 117