How do I test individual protractor tests in grails?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • iggyGrande
    New Member
    • Dec 2014
    • 1

    How do I test individual protractor tests in grails?

    I was religiously following icodeya's tutorial about incorporating protractor tests in my grails application. It works really well. I was wondering if there is a way for me to make a similar command for testing an individual protractor test file? Like: grails protractor someTest or something? Is that even possible? This is the entire file:


    Code:
    includeTargets << grailsScript("_GrailsRun")
    includeTargets << grailsScript("_GrailsClean")
    includeTool << gant.tools.Execute
     
    target(default: "Run all protractor tests.") {
         
        depends(clean, configureProxy, checkVersion, parseArguments, compile, packageApp)
         
        runApp()
        println 'Running grails app now...'
         
        def process = "protractor PATH/TO/config-e2e.js".execute()
        process.waitFor()
     
        println process
        println process.exitValue()
        println process.in.text
        println process.err.text
         
        println 'Shutting down the server...'
        stopServer()
         
        execute.shell("grails clean")
        print 'Done with protractor tests...'
    }
Working...