Где ошибка-то? Ты привел только варнинг от мавена, суть которого в том, что ты мавену не указываешь кодировку, поэтому он использует дефолтную системную, что не гарантирует правильность сборки на другой ОС, где может быть другая кодировка.
К запуску тестов эта ошибка отношения не имеет. Напиши подробнее в чём проблема?
Перехожу в директорию , запускаю : mvn test thucydides:aggregate
T E S T S
-------------------------------------------------------
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
Не видит ниодного теста
может поможет :
[main] INFO net.thucydides.core.requirements.ClasspathRequirementsProviderService - Using requirements providers: [net.thucydides.core.statistics.service.AnnotationBasedTagProvider@4b125ce3, net.thucydides.core.statistics.service.FeatureStoryTagProvider@22906196, net.thucydides.core.requirements.FileSystemRequirementsTagProvider@34f6d094, net.thucydides.core.requirements.AnnotationBasedTagProvider@37f7bfb6]
[main] INFO net.thucydides.core.requirements.ClasspathRequirementsProviderService - ADDING REQUIREMENTS PROVIDER net.thucydides.core.requirements.FileSystemRequirementsTagProvider@34f6d094
[main] INFO net.thucydides.core.requirements.ClasspathRequirementsProviderService - ADDING REQUIREMENTS PROVIDER net.thucydides.core.requirements.AnnotationBasedTagProvider@37f7bfb6
[main] INFO net.thucydides.core.requirements.RequirementsTagProvider - Reading requirements from net.thucydides.core.requirements.FileSystemRequirementsTagProvider@34f6d094
[main] INFO net.thucydides.core.requirements.RequirementsTagProvider - Reading requirements from net.thucydides.core.requirements.AnnotationBasedTagProvider@37f7bfb6
[main] INFO net.thucydides.core.requirements.RequirementsTagProvider - Requirements found:[]
java.lang.NullPointerException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at net.thucydides.junit.runners.ThucydidesStatement.evaluate(ThucydidesStatement.java:21)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at net.thucydides.junit.runners.ThucydidesRunner.runChild(ThucydidesRunner.java:413)
at net.thucydides.junit.runners.ThucydidesRunner.runChild(ThucydidesRunner.java:64)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at net.thucydides.junit.runners.ThucydidesRunner.run(ThucydidesRunner.java:239)
at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175)
at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:107)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:68)
import net.thucydides.core.annotations.Managed;
import net.thucydides.core.annotations.ManagedPages;
import net.thucydides.core.annotations.Steps;
import net.thucydides.core.annotations.Story;
import net.thucydides.core.pages.Pages;
import net.thucydides.junit.annotations.Concurrent;
import net.thucydides.junit.runners.ThucydidesRunner;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.openqa.selenium.WebDriver;
@RunWith(ThucydidesRunner.class)
@Story(Application.TestHomePage.class)
@Concurrent(threads="5")
public class TestHomePage
{
@Managed
public WebDriver driver;
@Before
public void myTest() {
driver.manage().window().maximize();
}
@ManagedPages(defaultUrl = "https://www..com/")
public Pages pages;
@Steps
public LoginMain action;
public BookingExecute get;
@Test
public void start()throws Exception
{
get.getMain("https://www..com/");
get.Starting();
}
}
…
import net.thucydides.core.annotations.Step;
import net.thucydides.core.pages.Pages;
import net.thucydides.core.steps.ScenarioSteps;
public class BookingExecute extends ScenarioSteps
{
public BookingExecute (Pages pages)
{
super(pages);
}
public Booking getBookingSteps()
{
return getPages().currentPageAt(Booking.class);
}
@Step
public void getMain (String url)
{
getBookingSteps().getMainPage(url);
}
@Step
public void Starting () throws InterruptedException
{
getBookingSteps().ClickOnSearchHotels();
}
}
…
import net.thucydides.core.annotations.findby.FindBy;
import net.thucydides.core.pages.PageObject;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
public class Booking extends PageObject
{
public Booking(WebDriver driver)
{
super(driver);
}
public void getMainPage(String url)
{
getDriver().get(url);
}
@FindBy(xpath = ("/html/body/div[1]/div[2]/div[2]/div[3]/div/div[3]/form/div[3]/a"))
WebElement search_click;
public void ClickOnSearchHotels() throws InterruptedException
{
search_click.click();
}
}
…
import net.thucydides.core.annotations.Feature;
public class Application
{
@Feature
public class TestHomePage {}
}
Браузер стартует и сразу падает при выполнении теста “start”
TEST STARTED: start
--------------------------------------------------------------------
[main] INFO net.thucydides.core.Thucydides - TEST NUMBER: 1
log4j:WARN No appenders could be found for logger (org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager).
log4j:WARN Please initialize the log4j system properly.
[main] INFO net.thucydides.core.Thucydides -
TEST PENDING: start
---------------------------------------------------------------------------------
[main] INFO net.thucydides.core.requirements.ClasspathRequirementsProviderService - Using requirements providers: [net.thucydides.core.statistics.service.AnnotationBasedTagProvider@bc7f85d, net.thucydides.core.statistics.service.FeatureStoryTagProvider@7582a7b5, net.thucydides.core.requirements.FileSystemRequirementsTagProvider@54d09858, net.thucydides.core.requirements.AnnotationBasedTagProvider@4ac1e4e8]
[main] INFO net.thucydides.core.requirements.ClasspathRequirementsProviderService - ADDING REQUIREMENTS PROVIDER net.thucydides.core.requirements.FileSystemRequirementsTagProvider@54d09858
[main] INFO net.thucydides.core.requirements.ClasspathRequirementsProviderService - ADDING REQUIREMENTS PROVIDER net.thucydides.core.requirements.AnnotationBasedTagProvider@4ac1e4e8
[main] INFO net.thucydides.core.requirements.RequirementsTagProvider - Reading requirements from net.thucydides.core.requirements.FileSystemRequirementsTagProvider@54d09858
[main] INFO net.thucydides.core.requirements.RequirementsTagProvider - Reading requirements from net.thucydides.core.requirements.AnnotationBasedTagProvider@4ac1e4e8
[main] INFO net.thucydides.core.requirements.RequirementsTagProvider - Requirements found:[]
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 2.595 sec <<< FAILURE!
в тестовом случае помогло…основным тестам нет…
всё та же проблема…в IDE стратуют, в терминале не хотят
mvn integration-test thucydides:aggregate
…
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
…
import BookingExecute;
import net.thucydides.core.annotations.Managed;
import net.thucydides.core.annotations.ManagedPages;
import net.thucydides.core.annotations.Steps;
import net.thucydides.core.annotations.Story;
import net.thucydides.core.pages.Pages;
import net.thucydides.junit.runners.ThucydidesRunner;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.openqa.selenium.WebDriver;
@RunWith(ThucydidesRunner.class)
@Story(Application.Booking.class)
public class Booking
{
@Managed
public WebDriver driver;
@Before
public void myTest()
{
driver.manage().window().maximize();
}
@ManagedPages(defaultUrl = "https://www..com/")
public Pages pages;
@Steps
public BookingExecute action;
@Test
public void Booking() throws InterruptedException
{
action.getMain("https://www..com/");
action.getStarting();
action.BookNow();
action.FillFields();
action.CardDetails();
action.ConfirmBooking();
action.CancelReservation();
}
}
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Unnamed - test:test:jar:1.0-SNAPSHOT
[INFO] task-segment: [integration-test]
[INFO] ------------------------------------------------------------------------
[INFO] [resources:resources {execution: default-resources}]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Nothing to compile - all classes are up to date
[INFO] [resources:testResources {execution: default-testResources}]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /home//Downloads/Selenium etc/test/src/test/resources
[INFO] [compiler:testCompile {execution: default-testCompile}]
[INFO] Nothing to compile - all classes are up to date
[INFO] [surefire:test {execution: default-test}]
[INFO] Surefire report directory: /home//Downloads/Selenium etc/test/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO] [jar:jar {execution: default-jar}]
[INFO] ------------------------------------------------------------------------
[INFO] Building Unnamed - test:test:jar:1.0-SNAPSHOT
[INFO] task-segment: [thucydides:aggregate] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] [thucydides:aggregate {execution: default-cli}]
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
log4j:WARN No appenders could be found for logger (freemarker.cache).
log4j:WARN Please initialize the log4j system properly.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5 seconds
[INFO] Finished at: Wed Jan 08 15:30:30 EET 2014
[INFO] Final Memory: 58M/574M
спасибо за совет , пригодится, хорошо упращает…
но всё равно, создав заново классы и закинув туда код - выдаёт ту же ошибку
IDE запускает, терминал нет