Closed GoogleCodeExporter closed 9 years ago
The same for baseURI and basePath. They should be configured just once per test
cycle, not in every test case.
Original comment by yegor256
on 9 Jul 2011 at 6:18
What I usually do is to define base class that every test inherit from that
defines the RA properties (port, baseURI etc). But since "port" etc are static
variables it should be enough to define them once. You may need to configure
your junit fork mode settings in ant or surefire. Perhaps a system property
could be a viable option as well though.
Original comment by johan.ha...@gmail.com
on 9 Jul 2011 at 1:18
Well, one base class for all test cases sounds like a very dirty solution.
Would be much better to enable global configuration of RestAssured through
".properties" file, or system variables (the most preferable way). Thanks!
Original comment by yegor256
on 9 Jul 2011 at 5:36
If you don't like inheritance you could also create a JUnit Rule which defines
your settings and apply that for each test class.
Original comment by johan.ha...@gmail.com
on 15 Jul 2011 at 7:08
Good suggestion for a workaround, thanks!
Original comment by yegor256
on 15 Jul 2011 at 8:51
Original comment by johan.ha...@gmail.com
on 22 Jan 2014 at 10:01
Original issue reported on code.google.com by
yegor256
on 9 Jul 2011 at 6:03