My directory structure is this:
src/main/java
src/main/resources
src/main/webapp
src/test/java/unitTest
src/test/java/functionalTest
I have unit tests and integration tests in the same project.
I running the commands mvn install.
"Why are you using <skip>true<skip>? Isn't the whole point to
run the tests?"
I do not know right to use maven. I'm new at this.
In the configuration it has "<skip>false</skip> " and not true.
If true, the tests not execute.
To run the tests, I use a test suite, the class "AllTeste.java",
running the unit tests and integration.
I running with "verify", and did not coverage. I’m sending in annex.
2011/2/18 Hilco Wijbenga <[email protected]>
> On 18 February 2011 11:06, Ewerton Vale Leal <[email protected]> wrote:
> > I did what you recommended and did not work.
> > The cargo and selenium plugins must be executed before run the coverage .
> > When I execute the install the coverage does not work and when I execute
> > the coverage, the cargo , selenium and unit tests don’t execute.
> > I’m sending in annex the log of install execution and coverage.
>
> What exactly is your directory structure? Do you have both unit tests
> and integration tests in the same project? What commands are you
> running? Why are you using <skip>true<skip>? Isn't the whole point to
> run the tests?
>
> I would expect you to run "mvn verify"? And, once that works, "mvn
> install" or "mvn deploy"? In either case, the Cobertura plugin should
> behave the same.
>
--
Ewerton Leal Vale
Bacharelando em Ciência da Computação - UFPI
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Capriovi 1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @
capriovi ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 71 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ capriovi ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-antrun-plugin:1.6:run (compile) @ capriovi ---
[INFO] Executing tasks
Generate:
[echo] jHeat: Deleting the previous generated application...
[delete] Deleting directory C:\workspace\Maven\Capriovi\src\main\webapp
[mkdir] Created dir: C:\workspace\Maven\Capriovi\src\main\webapp
[echo] jHeat: Moving all the libraries to the new application
[echo]
folder...
[copy] Copying 533 files to C:\workspace\Maven\Capriovi\src\main\webapp
[echo] jHeat: Generando a aplicação...
[echo] jHeat: Feito. Applicação está pronta.
[INFO] Executed tasks
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @
capriovi ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @
capriovi ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.7.1:test (default-test) @ capriovi ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-war-plugin:2.1.1:war (default-war) @ capriovi ---
[INFO] Packaging webapp
[INFO] Assembling webapp [capriovi] in
[C:\workspace\Maven\Capriovi\target\capriovi]
[INFO] Processing war project
[INFO] Copying webapp resources [C:\workspace\Maven\Capriovi\src\main\webapp]
[INFO] Webapp assembled in [3232 msecs]
[INFO] Building war: C:\workspace\Maven\Capriovi\target\capriovi.war
[WARNING] Warning: selected war files include a WEB-INF/web.xml which will be
ignored
(webxml attribute is missing from war task, or ignoreWebxml attribute is
specified as 'true')
[INFO]
[INFO] --- selenium-maven-plugin:1.1:start-server (start-server) @ capriovi ---
Launching Selenium Server
Waiting for Selenium Server...
[INFO] Redirecting output to:
C:\workspace\Maven\Capriovi\target\selenium\server.log
[INFO] User extensions:
C:\workspace\Maven\Capriovi\target\selenium\user-extensions.js
Selenium Server started
[INFO]
[INFO] --- cargo-maven2-plugin:1.0.5:start (start-container) @ capriovi ---
[INFO] [stalledLocalDeployer] Deploying
[C:\workspace\Maven\Capriovi\target\capriovi.war] to
[C:\workspace\Maven\Capriovi\target/tomcat6x/webapps]...
[INFO] [talledLocalContainer] Tomcat 6.x starting...
[WARNING] [talledLocalContainer] 18/02/2011 17:33:24
org.apache.tomcat.util.digester.SetPropertiesRule begin
[WARNING] [talledLocalContainer] AVISO: [SetPropertiesRule]{Server} Setting
property 'debug' to '2' did not find a matching property.
[WARNING] [talledLocalContainer] 18/02/2011 17:33:24
org.apache.tomcat.util.digester.SetPropertiesRule begin
[WARNING] [talledLocalContainer] AVISO: [SetPropertiesRule]{Server/Service}
Setting property 'debug' to '2' did not find a matching property.
[WARNING] [talledLocalContainer] 18/02/2011 17:33:24
org.apache.catalina.core.AprLifecycleListener init
[WARNING] [talledLocalContainer] INFO: The APR based Apache Tomcat Native
library which allows optimal performance in production environments was not
found on the java.library.path: C:\Program
Files\Java\jdk1.6.0_21\jre\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program
Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common
Files\Microsoft Shared\Windows
Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program
Files (x86)\MySQL\MySQL Server 5.1\bin;.C:\Program Files\Java\jdk1.6.0_21\bin
;C:\Program Files\Java\jdk1.6.0_21\bin;C:\Program
Files\TortoiseSVN\bin;C:\Program Files (x86)\Windows Live\Shared;C:\Program
Files (x86)\Mozilla Firefox;C:\Programas\maven\bin;
[WARNING] [talledLocalContainer] 18/02/2011 17:33:24
org.apache.tomcat.util.digester.SetPropertiesRule begin
[WARNING] [talledLocalContainer] AVISO:
[SetPropertiesRule]{Server/Service/Engine} Setting property 'debug' to '2' did
not find a matching property.
[WARNING] [talledLocalContainer] 18/02/2011 17:33:24
org.apache.tomcat.util.digester.SetPropertiesRule begin
[WARNING] [talledLocalContainer] AVISO:
[SetPropertiesRule]{Server/Service/Engine/Host} Setting property 'debug' to '2'
did not find a matching property.
[WARNING] [talledLocalContainer] 18/02/2011 17:33:24
org.apache.tomcat.util.digester.SetPropertiesRule begin
[WARNING] [talledLocalContainer] AVISO:
[SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property
'debug' to '2' did not find a matching property.
[WARNING] [talledLocalContainer] 18/02/2011 17:33:24
org.apache.coyote.http11.Http11Protocol init
[WARNING] [talledLocalContainer] INFO: Initializing Coyote HTTP/1.1 on http-8000
[WARNING] [talledLocalContainer] 18/02/2011 17:33:24
org.apache.catalina.startup.Catalina load
[WARNING] [talledLocalContainer] INFO: Initialization processed in 766 ms
[WARNING] [talledLocalContainer] 18/02/2011 17:33:24
org.apache.catalina.core.StandardService start
[WARNING] [talledLocalContainer] INFO: Starting service Catalina
[WARNING] [talledLocalContainer] 18/02/2011 17:33:24
org.apache.catalina.core.StandardEngine start
[WARNING] [talledLocalContainer] INFO: Starting Servlet Engine: Apache
Tomcat/6.0.32
[WARNING] [talledLocalContainer] 18/02/2011 17:33:32
org.apache.catalina.core.ApplicationContext log
[WARNING] [talledLocalContainer] INFO: No Configuration for this context.
Initializing.
[WARNING] [talledLocalContainer] 18/02/2011 17:33:32
org.apache.catalina.core.ApplicationContext log
[WARNING] [talledLocalContainer] INFO: configuring cewolf app..
[WARNING] [talledLocalContainer] 18/02/2011 17:33:32
org.apache.catalina.core.ApplicationContext log
[WARNING] [talledLocalContainer] INFO: using storage class
de.laures.cewolf.storage.TransientSessionStorage
[WARNING] [talledLocalContainer] 18/02/2011 17:33:32
org.apache.catalina.core.ApplicationContext log
[WARNING] [talledLocalContainer] INFO: using overlibURL overlib.js
[WARNING] [talledLocalContainer] 18/02/2011 17:33:32
org.apache.catalina.core.ApplicationContext log
[WARNING] [talledLocalContainer] INFO: debugging is turned on
[WARNING] [talledLocalContainer] 18/02/2011 17:33:32
org.apache.catalina.core.ApplicationContext log
[WARNING] [talledLocalContainer] INFO: ...done.
[WARNING] [talledLocalContainer] 18/02/2011 17:33:32
org.apache.catalina.startup.HostConfig deployWAR
[WARNING] [talledLocalContainer] INFO: Deploying web application archive
cargocpc.war
[WARNING] [talledLocalContainer] 18/02/2011 17:33:32
org.apache.catalina.startup.HostConfig deployDirectory
[WARNING] [talledLocalContainer] INFO: Deploying web application directory
host-manager
[WARNING] [talledLocalContainer] 18/02/2011 17:33:32
org.apache.catalina.startup.HostConfig deployDirectory
[WARNING] [talledLocalContainer] INFO: Deploying web application directory
manager
[WARNING] [talledLocalContainer] 18/02/2011 17:33:32
org.apache.coyote.http11.Http11Protocol start
[WARNING] [talledLocalContainer] INFO: Starting Coyote HTTP/1.1 on http-8000
[WARNING] [talledLocalContainer] 18/02/2011 17:33:32
org.apache.jk.common.ChannelSocket init
[WARNING] [talledLocalContainer] INFO: JK: ajp13 listening on /0.0.0.0:8009
[WARNING] [talledLocalContainer] 18/02/2011 17:33:32
org.apache.jk.server.JkMain start
[WARNING] [talledLocalContainer] INFO: Jk running ID=0 time=0/46 config=null
[WARNING] [talledLocalContainer] 18/02/2011 17:33:32
org.apache.catalina.startup.Catalina start
[WARNING] [talledLocalContainer] INFO: Server startup in 7882 ms
[INFO] [talledLocalContainer] Tomcat 6.x started on port [8000]
[INFO]
[INFO] --- maven-surefire-plugin:2.7.1:test (surefire-it) @ capriovi ---
[INFO] Surefire report directory:
C:\workspace\Maven\Capriovi\target\surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running AllTeste
Hibernate: select this_.idUsuario as idUsuario0_0_, this_.nome as nome0_0_,
this_.endereco as endereco0_0_, this_.estado as estado0_0_, this_.municipio as
municipio0_0_, this_.cpf as cpf0_0_, this_.telefone as telefone0_0_,
this_.email as email0_0_, this_.login as login0_0_, this_.senha as senha0_0_,
this_.role as role0_0_, this_.status as status0_0_, this_.motivo as motivo0_0_,
this_1_.idFazenda as idFazenda1_0_, this_3_.quantFazenda as quantFaz2_3_0_,
case when this_1_.idPeao is not null then 1 when this_2_.idAdministrador is not
null then 2 when this_3_.idPecuarista is not null then 3 when this_.idUsuario
is not null then 0 end as clazz_0_ from Usuario this_ left outer join Peao
this_1_ on this_.idUsuario=this_1_.idPeao left outer join Administrador this_2_
on this_.idUsuario=this_2_.idAdministrador left outer join Pecuarista this_3_
on this_.idUsuario=this_3_.idPecuarista where this_.login=?
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.928 sec
Results :
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] --- selenium-maven-plugin:1.1:stop-server (stop-server) @ capriovi ---
Stopping Selenium server...
Stop request sent
[INFO]
[INFO] --- cargo-maven2-plugin:1.0.5:stop (stop-container) @ capriovi ---
[INFO] [talledLocalContainer] Tomcat 6.x is stopping...
[WARNING] [talledLocalContainer] 18/02/2011 17:33:36
org.apache.coyote.http11.Http11Protocol pause
[WARNING] [talledLocalContainer] INFO: Pausing Coyote HTTP/1.1 on http-8000
[WARNING] [talledLocalContainer] 18/02/2011 17:33:37
org.apache.catalina.core.StandardService stop
[WARNING] [talledLocalContainer] INFO: Stopping service Catalina
[INFO] [talledLocalContainer] WARN: The method class
org.apache.commons.logging.impl.SLF4JLogFactory#release() was invoked.
[INFO] [talledLocalContainer] WARN: Please see http://www.slf4j.org/codes.html
for an explanation.
[WARNING] [talledLocalContainer] 18/02/2011 17:33:37
org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
[WARNING] [talledLocalContainer] GRAVE: The web application [/capriovi] appears
to have started a thread named [AWT-Windows] but has failed to stop it. This is
very likely to create a memory leak.
[WARNING] [talledLocalContainer] 18/02/2011 17:33:37
org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
[WARNING] [talledLocalContainer] GRAVE: The web application [/capriovi] appears
to have started a thread named [Store CaptchaStoreCache Spool Thread] but has
failed to stop it. This is very likely to create a memory leak.
[WARNING] [talledLocalContainer] 18/02/2011 17:33:38
org.apache.coyote.http11.Http11Protocol destroy
[WARNING] [talledLocalContainer] INFO: Stopping Coyote HTTP/1.1 on http-8000
[INFO] [talledLocalContainer] Tomcat 6.x is stopped
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 43.885s
[INFO] Finished at: Fri Feb 18 17:33:39 GMT-03:00 2011
[INFO] Final Memory: 23M/200M
[INFO] ------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]