unic / ScalaWebTest

ScalaWebTest is a library for writing ScalaTest/Selenium based integration tests for web applications. It helps you with your basic setup and provides a new and very efficient approach to testing.
https://scalawebtest.org
Apache License 2.0
29 stars 9 forks source link

configuration "it" don't exists and comma is missing. #69

Closed andreabisello closed 6 years ago

andreabisello commented 6 years ago

Hi, i'm not so skilled with scala, but i think there is something wrong with "Getting Started" in https://www.scalawebtest.org/documentation.html .

1) i think a comma is missing

image

2) even if i add the comma, i obtain this error

java.lang.IllegalArgumentException: Cannot add dependency 'org.scalawebtest#scalawebtest-core_2.12;2.0.1' to configuration 'it' of module default#scalawebtestexample_2.12;0.1 because this configuration doesn't exist!

that can be solved removing "it" configuration.

follow the complete log.

Error while importing sbt project:


[info] Loading settings for project global-plugins from idea.sbt ...
[info] Loading global plugins from C:\Users\andrea.bisello\.sbt\1.0\plugins
[info] Loading project definition from C:\src\scalawebtestexample\project
[info] Loading settings for project scalawebtestexample from build.sbt ...
[info] Set current project to scalawebtestexample (in build file:/C:/src/scalawebtestexample/)
[info] sbt server started at local:sbt-server-b7bda8432ba60dde419c
sbt:scalawebtestexample>
[info] Defining Global / sbtStructureOptions, Global / sbtStructureOutputFile, shellPrompt
[info] The new values will be used by no settings or tasks.
[info] Reapplying settings...
[info] Set current project to scalawebtestexample (in build file:/C:/src/scalawebtestexample/)
[info] Applying State transformations org.jetbrains.sbt.CreateTasks from C:/Users/andrea.bisello/.IdeaIC2018.2/config/plugins/Scala/launcher/sbt-structure-1.0.jar
[info] Reapplying settings...
[info] Set current project to scalawebtestexample (in build file:/C:/src/scalawebtestexample/)
[info] Updating ...
[error] java.lang.IllegalArgumentException: Cannot add dependency 'org.scalawebtest#scalawebtest-core_2.12;2.0.1' to configuration 'it' of module default#scalawebtestexample_2.12;0.1 because this configuration doesn't exist!
[error]     at org.apache.ivy.core.module.descriptor.DefaultDependencyDescriptor.addDependencyConfiguration(DefaultDependencyDescriptor.java:565)
[error]     at org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser$AbstractParser.parseDepsConfs(AbstractModuleDescriptorParser.java:157)
[error]     at org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser$AbstractParser.parseDepsConfs(AbstractModuleDescriptorParser.java:128)
[error]     at org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser$AbstractParser.parseDepsConfs(AbstractModuleDescriptorParser.java:118)
[error]     at org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser$AbstractParser.parseDepsConfs(AbstractModuleDescriptorParser.java:113)
[error]     at sbt.internal.librarymanagement.CustomXmlParser$CustomParser.parseDepsConfs(CustomXmlParser.scala:36)
[error]     at sbt.internal.librarymanagement.IvySbt$.convertDependency(Ivy.scala:925)
[error]     at sbt.internal.librarymanagement.IvySbt$.$anonfun$addDependencies$1(Ivy.scala:862)
[error]     at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:233)
[error]     at scala.collection.Iterator.foreach(Iterator.scala:937)
[error]     at scala.collection.Iterator.foreach$(Iterator.scala:937)
[error]     at scala.collection.AbstractIterator.foreach(Iterator.scala:1425)
[error]     at scala.collection.IterableLike.foreach(IterableLike.scala:70)
[error]     at scala.collection.IterableLike.foreach$(IterableLike.scala:69)
[error]     at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
[error]     at scala.collection.TraversableLike.map(TraversableLike.scala:233)
[error]     at scala.collection.TraversableLike.map$(TraversableLike.scala:226)
[error]     at scala.collection.AbstractTraversable.map(Traversable.scala:104)
[error]     at sbt.internal.librarymanagement.IvySbt$.addDependencies(Ivy.scala:861)
[error]     at sbt.internal.librarymanagement.IvySbt$Module.configureInline(Ivy.scala:288)
[error]     at sbt.internal.librarymanagement.IvySbt$Module.x$7$lzycompute(Ivy.scala:253)
[error]     at sbt.internal.librarymanagement.IvySbt$Module.x$7(Ivy.scala:250)
[error]     at sbt.internal.librarymanagement.IvySbt$Module.moduleDescriptor0$lzycompute(Ivy.scala:250)
[error]     at sbt.internal.librarymanagement.IvySbt$Module.moduleDescriptor0(Ivy.scala:250)
[error]     at sbt.internal.librarymanagement.IvySbt$Module.$anonfun$withModule$1(Ivy.scala:239)
[error]     at sbt.internal.librarymanagement.IvySbt.$anonfun$withIvy$1(Ivy.scala:204)
[error]     at sbt.internal.librarymanagement.IvySbt.sbt$internal$librarymanagement$IvySbt$$action$1(Ivy.scala:70)
[error]     at sbt.internal.librarymanagement.IvySbt$$anon$3.call(Ivy.scala:77)
[error]     at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:95)
[error]     at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:80)
[error]     at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:99)
[error]     at xsbt.boot.Using$.withResource(Using.scala:10)
[error]     at xsbt.boot.Using$.apply(Using.scala:9)
[error]     at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:60)
[error]     at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:50)
[error]     at xsbt.boot.Locks$.apply0(Locks.scala:31)
[error]     at xsbt.boot.Locks$.apply(Locks.scala:28)
[error]     at sbt.internal.librarymanagement.IvySbt.withDefaultLogger(Ivy.scala:77)
[error]     at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:199)
[error]     at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:196)
[error]     at sbt.internal.librarymanagement.IvySbt$Module.withModule(Ivy.scala:238)
[error]     at sbt.internal.librarymanagement.IvyActions$.updateEither(IvyActions.scala:193)
[error]     at sbt.librarymanagement.ivy.IvyDependencyResolution.update(IvyDependencyResolution.scala:20)
[error]     at sbt.librarymanagement.DependencyResolution.update(DependencyResolution.scala:56)
[error]     at sbt.internal.LibraryManagement$.resolve$1(LibraryManagement.scala:45)
[error]     at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$12(LibraryManagement.scala:93)
[error]     at sbt.util.Tracked$.$anonfun$lastOutput$1(Tracked.scala:68)
[error]     at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$19(LibraryManagement.scala:106)
[error]     at scala.util.control.Exception$Catch.apply(Exception.scala:224)
[error]     at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11(LibraryManagement.scala:106)
[error]     at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11$adapted(LibraryManagement.scala:89)
[error]     at sbt.util.Tracked$.$anonfun$inputChanged$1(Tracked.scala:149)
[error]     at sbt.internal.LibraryManagement$.cachedUpdate(LibraryManagement.scala:120)
[error]     at sbt.Classpaths$.$anonfun$updateTask$5(Defaults.scala:2556)
[error]     at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error]     at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:40)
[error]     at sbt.std.Transform$$anon$4.work(System.scala:67)
[error]     at sbt.Execute.$anonfun$submit$2(Execute.scala:269)
[error]     at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error]     at sbt.Execute.work(Execute.scala:278)
[error]     at sbt.Execute.$anonfun$submit$1(Execute.scala:269)
[error]     at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178)
[error]     at sbt.CompletionService$$anon$2.call(CompletionService.scala:37)
[error]     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error]     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error]     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error]     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error]     at java.lang.Thread.run(Thread.java:748)
[error] java.lang.IllegalArgumentException: Cannot add dependency 'org.scalawebtest#scalawebtest-core_2.12;2.0.1' to configuration 'it' of module default#scalawebtestexample_2.12;0.1 because this configuration doesn't exist!
[error]     at org.apache.ivy.core.module.descriptor.DefaultDependencyDescriptor.addDependencyConfiguration(DefaultDependencyDescriptor.java:565)
[error]     at org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser$AbstractParser.parseDepsConfs(AbstractModuleDescriptorParser.java:157)
[error]     at org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser$AbstractParser.parseDepsConfs(AbstractModuleDescriptorParser.java:128)
[error]     at org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser$AbstractParser.parseDepsConfs(AbstractModuleDescriptorParser.java:118)
[error]     at org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser$AbstractParser.parseDepsConfs(AbstractModuleDescriptorParser.java:113)
[error]     at sbt.internal.librarymanagement.CustomXmlParser$CustomParser.parseDepsConfs(CustomXmlParser.scala:36)
[error]     at sbt.internal.librarymanagement.IvySbt$.convertDependency(Ivy.scala:925)
[error]     at sbt.internal.librarymanagement.IvySbt$.$anonfun$addDependencies$1(Ivy.scala:862)
[error]     at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:233)
[error]     at scala.collection.Iterator.foreach(Iterator.scala:937)
[error]     at scala.collection.Iterator.foreach$(Iterator.scala:937)
[error]     at scala.collection.AbstractIterator.foreach(Iterator.scala:1425)
[error]     at scala.collection.IterableLike.foreach(IterableLike.scala:70)
[error]     at scala.collection.IterableLike.foreach$(IterableLike.scala:69)
[error]     at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
[error]     at scala.collection.TraversableLike.map(TraversableLike.scala:233)
[error]     at scala.collection.TraversableLike.map$(TraversableLike.scala:226)
[error]     at scala.collection.AbstractTraversable.map(Traversable.scala:104)
[error]     at sbt.internal.librarymanagement.IvySbt$.addDependencies(Ivy.scala:861)
[error]     at sbt.internal.librarymanagement.IvySbt$Module.configureInline(Ivy.scala:288)
[error]     at sbt.internal.librarymanagement.IvySbt$Module.x$7$lzycompute(Ivy.scala:253)
[error]     at sbt.internal.librarymanagement.IvySbt$Module.x$7(Ivy.scala:250)
[error]     at sbt.internal.librarymanagement.IvySbt$Module.moduleDescriptor0$lzycompute(Ivy.scala:250)
[error]     at sbt.internal.librarymanagement.IvySbt$Module.moduleDescriptor0(Ivy.scala:250)
[error]     at sbt.internal.librarymanagement.IvySbt$Module.$anonfun$withModule$1(Ivy.scala:239)
[error]     at sbt.internal.librarymanagement.IvySbt.$anonfun$withIvy$1(Ivy.scala:204)
[error]     at sbt.internal.librarymanagement.IvySbt.sbt$internal$librarymanagement$IvySbt$$action$1(Ivy.scala:70)
[error]     at sbt.internal.librarymanagement.IvySbt$$anon$3.call(Ivy.scala:77)
[error]     at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:95)
[error]     at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:80)
[error]     at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:99)
[error]     at xsbt.boot.Using$.withResource(Using.scala:10)
[error]     at xsbt.boot.Using$.apply(Using.scala:9)
[error]     at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:60)
[error]     at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:50)
[error]     at xsbt.boot.Locks$.apply0(Locks.scala:31)
[error]     at xsbt.boot.Locks$.apply(Locks.scala:28)
[error]     at sbt.internal.librarymanagement.IvySbt.withDefaultLogger(Ivy.scala:77)
[error]     at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:199)
[error]     at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:196)
[error]     at sbt.internal.librarymanagement.IvySbt$Module.withModule(Ivy.scala:238)
[error]     at sbt.internal.librarymanagement.IvyActions$.updateEither(IvyActions.scala:193)
[error]     at sbt.librarymanagement.ivy.IvyDependencyResolution.update(IvyDependencyResolution.scala:20)
[error]     at sbt.librarymanagement.DependencyResolution.update(DependencyResolution.scala:56)
[error]     at sbt.internal.LibraryManagement$.resolve$1(LibraryManagement.scala:45)
[error]     at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$12(LibraryManagement.scala:93)
[error]     at sbt.util.Tracked$.$anonfun$lastOutput$1(Tracked.scala:68)
[error]     at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$19(LibraryManagement.scala:106)
[error]     at scala.util.control.Exception$Catch.apply(Exception.scala:224)
[error]     at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11(LibraryManagement.scala:106)
[error]     at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11$adapted(LibraryManagement.scala:89)
[error]     at sbt.util.Tracked$.$anonfun$inputChanged$1(Tracked.scala:149)
[error]     at sbt.internal.LibraryManagement$.cachedUpdate(LibraryManagement.scala:120)
[error]     at sbt.Classpaths$.$anonfun$updateTask$5(Defaults.scala:2556)
[error]     at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error]     at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:40)
[error]     at sbt.std.Transform$$anon$4.work(System.scala:67)
[error]     at sbt.Execute.$anonfun$submit$2(Execute.scala:269)
[error]     at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error]     at sbt.Execute.work(Execute.scala:278)
[error]     at sbt.Execute.$anonfun$submit$1(Execute.scala:269)
[error]     at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178)
[error]     at sbt.CompletionService$$anon$2.call(CompletionService.scala:37)
[error]     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error]     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error]     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error]     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error]     at java.lang.Thread.run(Thread.java:748)
[error] (update) java.lang.IllegalArgumentException: Cannot add dependency 'org.scalawebtest#scalawebtest-core_2.12;2.0.1' to configuration 'it' of module default#scalawebtestexample_2.12;0.1 because this configuration doesn't exist!
[error] (ssExtractDependencies) java.lang.IllegalArgumentException: Cannot add dependency 'org.scalawebtest#scalawebtest-core_2.12;2.0.1' to configuration 'it' of module default#scalawebtestexample_2.12;0.1 because this configuration doesn't exist!
[error] Total time: 0 s, completed 22-ott-2018 17.36.25
[info] shutting down server
DaniRey commented 6 years ago
  1. Good catch, thank you. I will add that comma tomorrow.
  2. Sorry, I forgot that "it", the integration testing phase isn't available by default. Either use "test" instead or activate it with
    
    .settings(Defaults.itSettings: _*)``` 
    see 
    https://github.com/unic/ScalaWebTest/blob/master/build.sbt
andreabisello commented 6 years ago

it works, thanks.

DaniRey commented 6 years ago

Glad it work for you @abioneperhobby I reopened the ticket, because to me it is only solved when the documentation is fixed and improved.