The Artima Developer Community
Sponsored Link

ScalaTest/ScalaUtils Forum
Best Practices for Structuring Tests

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Greg Zoller

Posts: 3
Nickname: gzoller
Registered: Sep, 2010

Best Practices for Structuring Tests Posted: Sep 14, 2010 2:06 PM
Reply to this message Reply
Advertisement
Hello,

I'm a Scalatest newbie. I see examples on the web site how to do many interesting tests but these are for small examples.

What if I have a huge system and I want to break out my tests into lots of classes, so one for LoginTests, SearchTests, etc.? What's the best way to structure my test code to do this?

I tried a master Spec class that as part of the constructor created another class derived from Spec. That created no errors but didn't run the tests either.

class ServiceTest extends FlatSpec with MustMatchers {

val serviceInstance = new ProfileServiceImpl
val ip = java.net.InetAddress.getByName("localhost")

new LoginTests(serviceInstance,ip)
...

Any ideas appreciated. Thanks!
Greg

Topic: strange execution order in WordSpec test Previous Topic   Next Topic Topic: Strange characters in output

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use