Git Product home page Git Product logo

thucydides-webtests / thucydides Goto Github PK

View Code? Open in Web Editor NEW
261.0 261.0 99.0 61.94 MB

Thucydides is a tool that lets you use WebDriver-based unit or BDD tests to write more flexible and more reusable WebDriver-based tests, and also to generate documentation about your acceptance tests, including a narrative description of test, along with the corresponding screen shots, and also high-level summaries and aggregations of the test results

Home Page: http:/www.wakaleo.com/thucydides

License: Other

JavaScript 28.31% Shell 0.24% Groovy 8.05% Java 41.98% HTML 16.75% CSS 1.40% XSLT 0.03% Gherkin 0.03% FreeMarker 3.22%

thucydides's People

Contributors

alex-okrushko avatar arussel avatar cliviu avatar cvmocanu avatar dependabot[bot] avatar drxaos avatar freest avatar gmlewis avatar hnygard avatar hwellmann avatar imbiriny avatar lex007in avatar lvendramini avatar mdolinin avatar michaelbannister avatar mikezx6r avatar poum avatar rahulj51 avatar ramil-k avatar tomakehurst avatar trungie avatar vase4kin avatar vitalikasyanenka avatar wakaleo avatar wimsymons avatar xsalefter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

thucydides's Issues

Recursive step libraries

There are really two things we need resolved here:

  1.   Steps should be injectable into steps in a cyclical manner (even into themselves if possible, this allows base classes to contain steps which may be themselves)
    
  2.   When invoking a step that returns a step objects, if a subsequent step on the returned step object is invoked, it should be included in the report.
    

Eg.
pageTwoSteps = pageOneStepsObject1.clickContinue();
pageTwoSteps.verifySomeStuff();

If we do this currently, the verifySomeStuff does not appear in the report. We believe this occurs because we do not inject Steps using the @steps annotation, but construct them in the ctors to get around issue 1.
E.g currently in practice we must:
public DemoSteps2 demoSteps2;

  public DemoSteps1(Pages pages) {
        super(pages);
        demoSteps2 = new DemoSteps2(pages);
  }

Screenshot gallery

Screenshots taken during the tests are displayed in an image galerie.

Csv Tests Stop Running Once A Test Fails

When running the csv tests using withTestDataFrom(csvFile).run(step).method(), once a test fails, the tests immediately stops, preventing other data from being ran from the csv file.

Ie withTestDataFrom("datasets/property.csv").run(lnmSteps).create_new_properties_via_csv_input();

page.containsText returns true if the text is not visible

Maybe it's not a bug but a feature request :

the page.containsText returns true if the text is in the page even if it is not visible (eg in a div with class="display:none").

maybe it might be a containsVisibleText function that returns true only if the text is visible.

Steps within steps

There are really two things we need resolved here:

  1.   Steps should be injectable into steps in a cyclical manner (even into themselves if possible, this allows base classes to contain steps which may be themselves)
    
  2.   When invoking a step that returns a step objects, if a subsequent step on the returned step object is invoked, it should be included in the report.
    

Eg.
pageTwoSteps = pageOneStepsObject1.clickContinue();
pageTwoSteps.verifySomeStuff();

If we do this currently, the verifySomeStuff does not appear in the report. We believe this occurs because we do not inject Steps using the @steps annotation, but construct them in the ctors to get around issue 1.
E.g currently in practice we must:
public DemoSteps2 demoSteps2;

  public DemoSteps1(Pages pages) {
        super(pages);
        demoSteps2 = new DemoSteps2(pages);
  }

Error to run demo

Hi,

Please, I'm trying to run the demo (https://github.com/thucydides-webtests/thucydides/wiki/Getting-Started) and is experiencing the following error:

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building wikipediawebtests
[INFO] task-segment: [test, thucydides:aggregate]
[INFO] ------------------------------------------------------------------------
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\teste\wikipediatests\src\main\resources
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Nothing to compile - all classes are up to date
[INFO] [resources:testResources {execution: default-testResources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\teste\wikipediatests\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: C:\teste\wikipediatests\target\surefire-reports
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.


T E S T S

Running com.wakaleo.webtests.wikipedia.SearchByKeywordStoryTest
org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:96)
at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:148)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:85)
at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:127)
at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:78)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:501)
at java.lang.Class.newInstance0(Class.java:350)
at java.lang.Class.newInstance(Class.java:303)
at net.thucydides.core.webdriver.WebDriverFacade.newDriverInstance(WebDriverFacade.java:80)
at net.thucydides.core.webdriver.WebDriverFacade.newProxyDriver(WebDriverFacade.java:72)
at net.thucydides.core.webdriver.WebDriverFacade.getProxiedDriver(WebDriverFacade.java:32)
at net.thucydides.core.webdriver.WebDriverFacade.findElement(WebDriverFacade.java:123)
at org.openqa.selenium.support.pagefactory.DefaultElementLocator.findElement(DefaultElementLocator.java:58)
at org.openqa.selenium.support.pagefactory.AjaxElementLocator.access$001(AjaxElementLocator.java:39)
at org.openqa.selenium.support.pagefactory.AjaxElementLocator$SlowLoadingElement.isLoaded(AjaxElementLocator.java:121)
at org.openqa.selenium.support.ui.SlowLoadableComponent.get(SlowLoadableComponent.java:49)
at org.openqa.selenium.support.pagefactory.AjaxElementLocator.findElement(AjaxElementLocator.java:69)
at net.thucydides.core.webdriver.WebDriverFactory$DisplayedElementLocator.findElement(WebDriverFactory.java:75)
at org.openqa.selenium.support.pagefactory.internal.LocatingElementHandler.invoke(LocatingElementHandler.java:35)
at $Proxy13.sendKeys(Unknown Source)
at com.wakaleo.webtests.wikipedia.pages.HomePage.enter_keywords(HomePage.java:21)
at com.wakaleo.webtests.wikipedia.steps.EndUserSteps.searches_for(EndUserSteps.java:19)
at com.wakaleo.webtests.wikipedia.steps.EndUserSteps$$EnhancerByCGLIB$$4a48b0ab.CGLIB$searches_for$0()
at com.wakaleo.webtests.wikipedia.steps.EndUserSteps$$EnhancerByCGLIB$$4a48b0ab$$FastClassByCGLIB$$38b56f8b.invoke()
at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:215)
at net.thucydides.core.steps.StepInterceptor.runTestStep(StepInterceptor.java:171)
at net.thucydides.core.steps.StepInterceptor.testStepResult(StepInterceptor.java:94)
at net.thucydides.core.steps.StepInterceptor.intercept(StepInterceptor.java:60)
at com.wakaleo.webtests.wikipedia.steps.EndUserSteps$$EnhancerByCGLIB$$4a48b0ab.searches_for()
at com.wakaleo.webtests.wikipedia.SearchByKeywordStoryTest.searching_by_unambiguious_keyword_should_display_the_corresponding_article(SearchByKeywordStoryTest.java:33)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:592)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at net.thucydides.junit.runners.ThucydidesStatement.evaluate(ThucydidesStatement.java:25)
at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
at net.thucydides.junit.runners.ThucydidesRunner.runChild(ThucydidesRunner.java:225)
at net.thucydides.junit.runners.ThucydidesRunner.runChild(ThucydidesRunner.java:40)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at net.thucydides.junit.runners.ThucydidesRunner.run(ThucydidesRunner.java:160)
at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:592)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
Tests run: 2, Failures: 0, Errors: 1, Skipped: 1, Time elapsed: 53.613 sec <<< FAILURE!

Results :

Tests in error:
searching_by_unambiguious_keyword_should_display_the_corresponding_article(com.wakaleo.webtests.wikipedia.SearchByKeywordStoryTest)

Tests run: 2, Failures: 0, Errors: 1, Skipped: 1

What can be wrong in my setup?

Thanks,
Israel Santiago

Thucydides how to check the timeout and where to set the time and what is the default time ?

HI team,

i meet a issue, when i add node on UI, if check the connection time >30s , then the automation framework will terminate and failed, all step will pending, so i don't known the timeout how to check the time, and where to set the time and what is the default time ?

212223 [pool-1-thread-1] INFO com.xxx.xx.suites.demo.freshinstall.DemoSuiteUIFreshInstallSteps$$EnhancerByCGLIB$$6899c078 - add the thrid master node
Oct 09, 2018 5:08:52 PM com.xxxx.xx.util.LocalizationUtils analyseConfig
INFO: Loading localization config file of:file:/root/workspace/cxx_UI_multiple/cxx-automation/target/classes/localization.conf
When add master nodes (FAILED)
(org.openqa.selenium.TimeoutException: Timed out after 30 seconds
Build info: version: '2.43.1', revision: '5163bceef1bc36d43f3dc0b83c88998168a363a0', time: '2014-09-10 09:43:55'
System info: host: 'Automation001', ip: '10.0.0.0', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-327.28.3.el7.x86_64', java.version: '1.8.0_144'

HtmlTable does not work properly on tables that have <th> inside <tbody>

The problem is in this method:

private List<WebElement> cellsIn(WebElement row) {

This makes the class completely ignore <th> cells in table rows, making it impossible to match on the content of those cells.

The xpath should be changed to look for <td> or <th>, as per the HTML5 spec:
https://html.spec.whatwg.org/multipage/tables.html#the-th-element

Thucydides Cucumber-JVM support

Hi,

I was wondering if there is any work done to support the cucumber JVM. Please let me know, if any one has any update on it or any individual has its own project for it.

Regards,
Irfan

Tests cannot run against untrusted sites using the Firefox driver

To fix this issue we need to be able to set the AssumeUntrustedCertificateIssuer property in the FirefoxProfile and use it to instantiate the FirefoxDriver. At the moment Thucydides only instantiate the FirefoxDriver using the empty constructor, therefore using the default Firefox driver settings.

Thucydides biased towards firefox? Is there built-in IE support?

After playing around with a sample test I'm creating, I'm realizing that this framework is biased towards firefox.

I've tried this, to set the driver to IE, but it fails.
@Managed
public WebDriver webdriver = new InternetExplorerDriver();

I've also tried configuring it in settings, but it seems like the ThucydidesRunner defaults the browser back to firefox at some point.

What's the scoop with that?

Thanks,
-Sam

Unable to use spring-context with thucydides-jbehave

I'm using the thucydides-jbehave-plugin and I'm unable to inject my spring context to load my beans to use in the steps classes.

My only jbehave test suite I'm using to run the tests is:

package com.sratest.jbehave;

import org.jbehave.core.annotations.Configure;
import org.jbehave.core.annotations.spring.UsingSpring;

import net.thucydides.jbehave.ThucydidesJUnitStories;

@Configure
@UsingSpring(resources = {"META-INF/spring/integration/spring-context.xml"})
public class SpringTestSuite extends ThucydidesJUnitStories {

}

I've noticed that this fails to actually load the context (when I comment out the @configure and @UsingSpring in the class above it runs just the same.)

I looked at the manual for thucydides but it only shows spring integrated directly with thucydides and not when used with the jbehave plugin.

I tried part of the example shown but it didn't work

package com.sratest.jbehave;

import org.springframework.test.context.ContextConfiguration;

@ContextConfiguration(locations = "/META-INF/spring/integration/spring-context.xml") 
public class SpringTestSuite extends ThucydidesJUnitStories {
}

Am I missing something obvious? Is there a way to use spring-context/autowire beans within Thucydides-Jbehave?

Enhancement - wait until 1 of 2 elements display

Need a way to wait until 1 of 2 things happens. IE a file is uploaded, either the name will appear in a grid or an error message will appear under the upload control.

Maybe something like this?
waitForRenderedElements(By.xpath(xpathSearch), By.xpath("//div[@Class='pectin-ValidationDisplayLabel pectin-ValidationDisplayLabel-validationError']"));

In sagwebtests it would be used the class ConcludeAgreementPage.java, in the method --> public void uploadAgreement(String uploadFileName)

This is called by the test CreateANewMAAWithExistingPropertyOwner.story
scenario "user can upload a pdf more than thousand kb and less than thousand onehundred"
step = create_list_new_management.concludeAgreementUploadNormalPdf("documentUpload/normal.pdf");

Please close it

Create test that is marked as @ignored JUnit annotation in test class.
run test via maven command: mvn test -Dtest=testName

After running test was skiped but NullPointerException was thrown from runner.

Using thucydides 0.9.233, surefire 2.17, JUnit 4.11

Better exception reporting in ResizableImage

net.thucydides.core.images.ResizableImage in method resizeImage, lines 68-70:

} catch (Throwable e) {
    throw new IllegalArgumentException();
}

Please pass the caught exception to the thrown IllegalArgumentException: throw new IllegalArgumentException(e)
I currently see those exception on my CI server and I can only guess what went wrong.

All tests are skipped if they are run from a file system path that contains spaces

When running the tests with the maven plugin from a path that contains a space, an internal error is created which causes all tests to be skipped.

I have debugged it and traced the problem in net.thucydides.core.reports.xml.XMLTestOutcomeReporter in the generateReportFor method.

Not sure how to fix though, didn't had time to investigate too much.

Provide a mechanism to slow down the test runner

It would be handy to be able to slow down the web tests during development so you can clearly see what a test is doing. At the default speed it runs too quickly and you have to add breakpoints in the code to slow it down.

Mac build issue using maven 3.0.3

Using maven 3.0.3 the thucydides build failes when launching Firefox:

Running net.thucydides.core.webdriver.WhenInstanciatingANewDriver
org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:96)
at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:148)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:85)
at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:127)
at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:78)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at net.thucydides.core.webdriver.WebDriverFactory.newWebdriverInstance(WebDriverFactory.java:37)
at net.thucydides.core.webdriver.mocks.TestableWebDriverFactory.newWebdriverInstance(TestableWebDriverFactory.java:79)
at net.thucydides.core.webdriver.WebDriverFactory.newInstanceOf(WebDriverFactory.java:28)
at net.thucydides.core.webdriver.WhenInstanciatingANewDriver.should_support_creating_a_firefox_driver(WhenInstanciatingANewDriver.java:30)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
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:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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:172)
at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:104)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:70)
Tests run: 4, Failures: 0, Errors: 4, Skipped: 0, Time elapsed: 51.262 sec <<< FAILURE!
Running net.thucydides.core.webdriver.WhenManagingGlobalConfiguration
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec
Running net.thucydides.core.webdriver.WhenManagingWebdriverInstances
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec
Running net.thucydides.core.webdriver.WhenObtainingAWebdriverInstance
Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec
Running net.thucydides.core.webdriver.WhenUsingAWebDriverProxy
Tests run: 25, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.08 sec
Running net.thucydides.core.webelements.WhenManipulatingCheckboxFields
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.003 sec

Results :

Tests in error:
should_support_creating_a_firefox_driver(net.thucydides.core.webdriver.WhenInstanciatingANewDriver): Could not instantiate class org.openqa.selenium.firefox.FirefoxDriver
should_support_creating_a_firefox_driver(net.thucydides.core.webdriver.WhenInstanciatingANewDriver)
should_support_creating_a_chrome_driver(net.thucydides.core.webdriver.WhenInstanciatingANewDriver): Could not instantiate class org.openqa.selenium.chrome.ChromeDriver
should_support_creating_a_chrome_driver(net.thucydides.core.webdriver.WhenInstanciatingANewDriver)

Tests run: 555, Failures: 0, Errors: 4, Skipped: 1

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] thucydides ........................................ SUCCESS [3.207s]
[INFO] thucydides-test-utils ............................. SUCCESS [5.600s]
[INFO] thucydides-report-resources ....................... SUCCESS [2.167s]
[INFO] thucydides-sample-alternative-resources ........... SUCCESS [1.431s]
[INFO] thucydides-core ................................... FAILURE [1:12.423s]
[INFO] thucydides-junit .................................. SKIPPED
[INFO] Thucydides Maven Plugin ........................... SKIPPED
[INFO] Thucydides maven plugin integration tests ......... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:25.309s
[INFO] Finished at: Wed Jul 06 11:09:19 PDT 2011
[INFO] Final Memory: 14M/2043M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.9:test (unit-tests) on project thucydides-core: There are test failures.
[ERROR]
[ERROR] Please refer to /Users/ksader/tier3-dev/testing/thucydides/thucydides-core/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :thucydides-core

Check if web element contains a string

Can we make a method that checks if a Web Element contains a string (ie a drop down contains an option). I'd imagine it would work very similar to waitForAnyTextToAppear(WebElement element, String ... expectedText)
but instead of waiting it would simple do a check.

RenderedPageObjectView - waitForPresenceOf(byElementCriteria) has hard coded timeout value

The hard coded timeout is causing our tests to fail (we need a higher timeout). Had to override in PageObject.

Link to the line:
https://github.com/thucydides-webtests/thucydides/blob/master/thucydides-core/src/main/java/net/thucydides/core/pages/RenderedPageObjectView.java#L93

    /**
     * This method will wait until an element is present on the screen, though not necessarily visible.
     */
    public void waitForPresenceOf(final By byElementCriteria) {
        WebDriverWait wait = new WebDriverWait(driver, 5);
        wait.until(ExpectedConditions.presenceOfElementLocated(byElementCriteria));
//        waitForCondition().until(elementPresent(byElementCriteria));
    }

UnsupportedDriverException when running test case in linux

OS: LINUX
Selenium Version: 2.53.1
Browser: chrome 65
Chromrdriver: 2.37

While running the test cases in Windows agent, I got success but when running the same in Linux I get unsupported driver exception.
I tried all the chrome driver compatibility with chrome browser but same error

Caused by: net.thucydides.core.webdriver.UnsupportedDriverException at HomeSteps.java:37
Caused by: net.thucydides.core.webdriver.UnsupportedDriverException at HomeSteps.java:37
Caused by: org.openqa.selenium.WebDriverException at HomeSteps.java:37

Dependencies in build.gradle:-
compile group: 'org.seleniumhq.selenium', name: 'selenium-server', version:'2.53.1'
compile group: 'net.serenity-bdd', name: 'serenity-core', version:'1.1.25-rc.5'
compile group: 'org.seleniumhq.selenium', name: 'selenium-java', version:'2.53.1'
//compile group: 'org.slf4j', name: 'slf4j-simple', version:'1.7.7'
compile group: 'net.serenity-bdd', name: 'serenity-junit', version: '1.2.3-rc.3'
compile group: 'org.assertj', name: 'assertj-core', version:'1.7.0'
compile group: 'com.googlecode.lambdaj', name: 'lambdaj', version:'2.3.3'
compile group: 'org.scream3r', name: 'jssc', version:'2.8.0'
compile group: 'org.apache.commons', name: 'commons-exec', version:'1.3'
compile group: 'org.apache.commons', name: 'commons-lang3', version:'3.0'
compile group: 'commons-io', name: 'commons-io', version:'2.4'
compile group: 'commons-lang', name: 'commons-lang', version: '2.6'
compile group: 'log4j', name: 'log4j', version:'1.2.17'
compile group: 'com.thoughtworks.xstream', name: 'xstream', version: '1.4.9'
compile group: 'com.googlecode.json-simple', name: 'json-simple', version: '1.1.1'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version:'2.8.5'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version:'2.8.5'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version:'2.8.5'
compile group: 'org.springframework', name: 'spring-core', version:'4.3.3.RELEASE'
compile group: 'org.apache.cxf', name: 'cxf-rt-frontend-jaxws', version:'3.0.2'
compile group: 'com.google.code.gson', name: 'gson', version: '2.6.2'
compile group: 'com.google.guava', name: 'guava', version: '22.0'
compile group: 'org.apache.cxf', name: 'cxf-rt-transports-http', version: '3.0.3'
compile(group: 'nddsjava-natives', name: 'nddsjava-natives', version:'5.3.0.2',classifier:'natives-linux64bit')
compile(group: 'nddsjava-natives', name: 'nddsjava-natives', version: '5.3.0.2',classifier:'natives-macosx64bit')
compile(group: 'nddsjava-natives', name: 'nddsjava-natives', version: '5.3.0.2',classifier:'natives-windows64bit')
compile group: 'org.apache.poi', name: 'poi', version: '3.9'

Why it is so that it worked in windows agent and not in linux?

Report aggregate - Running test with parametrized test data seems to have a limitation of 10 parameter pairs

Screen Shot 2013-03-20 at 6 59 14 PM
Screen Shot 2013-03-20 at 6 59 31 PM
Screen Shot 2013-03-20 at 7 00 11 PM

Steps to reproduce:

  1. Create a test (I use thucydides-junit project)
  2. Create a @testdata method which returns more that 10 pairs of parameters, e.g
    @testdata(columnNames = "Word,Definition")
    public static Collection<Object[]> testData2() {
    return Arrays.asList(new Object[][]{
    {"apple", "A common, round fruit"},
    {"apple2", "A common, round fruit"},
    {"apple3", "A common, round fruit"},
    {"apple4", "A common, round fruit"},
    {"apple5", "A common, round fruit"},
    {"apple6", "A common, round fruit"},
    {"apple7", "A common, round fruit"},
    {"apple8", "A common, round fruit"},
    {"apple9", "A common, round fruit"},
    {"apple10", "A common, round fruit"},
    {"apple11", "A common, round fruit"},
    {"apple12", "A common, round fruit"},
    {"apple13", "A common, round fruit"},
    {"apple14", "A common, round fruit"},
    {"apple15", "A common, round fruit"},
    {"apple16", "A common, round fruit"},
    {"apple17", "A common, round fruit"},
    {"apple18", "A common, round fruit"},
    {"apple19", "A common, round fruit"},
    {"apple20", "A common, round fruit"},
    {"apple21", "A common, round fruit"},
    {"apple22", "A common, round fruit"}
    });
    }
  3. Run the test and aggregate the report

Expected result:
In capabilities.html I am shown only one test. When I click on the test I see 22 pairs of parameters in a table

Actual result:
In capabilities.html I am shown 13 tests, from which

  • 1 test contains 10 pairs of parameters
  • 12 tests (with the same name) contain only one pair of parameters

Web-tests bypassing form validation?

When running web-tests, we are finding that they enter values for various types of inputs in a form, but the form validation is not enabling the submit button (once all mandatory fields have values or similar conditions are met), this behavior does not occur when we test manually however.
This could be a timing issue, or to do with the need to tab out of inputs after entering values in them, the test needs to wait for some page elements to load, not sure if this is having an impact.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.