Giter VIP home page Giter VIP logo

carina-demo's Introduction

Zebrunner CE (Community Edition) is a Test Automation Management Tool for continuous testing and continuous deployment. It allows you to run various kinds of tests and gain successive levels of confidence in the code quality. It is built in accordance with Infrastructure as Code processes.

Zebrunner is integrated by default with carina-core open source TestNG framework and uses Jenkins as a CI Tool.

It is built on top of popular docker solutions, it includes Postgres database, Zebrunner Reporting, Jenkins Master/Slaves Nodes, Selenium Hub, Mobile Device Farm (MCloud), SonarQube etc.

All components are deployed under NGINX WebServer which can be configured in a fully secured environment

Zebrunner subcomponents all together can be used as an effective Test Automation infrastructure for test automation development, execution, management, etc.

Support Zebrunner CE

Feel free to support the development with a donation for the next improvements.

Zebrunner

Hardware requirements

Requirements
Operating System Ubuntu 16.04 - 21.10
Linux CentOS 7+
Amazon Linux 2
CPU 8+ Cores
Memory 32 Gb RAM
Free space SSD 128Gb+ of free space

Software requirements

  • Installed Docker v19+

  • Installed Docker compose plugin v2.20.3+

  • Install git 2.20.0+

Initial setup

Visit Zebrunner Guide for detailed installation and configuration instructions.

  1. Clone Zebrunner CE recursively and launch setup procedure:

    git clone --recurse-submodule https://github.com/zebrunner/community-edition.git && cd community-edition && ./zebrunner.sh setup
    

    Provide required details and start services.

  2. After the startup, the following components might be available:

    Use your host address instead of hostname!

Components URL
Zebrunner Reporting http://hostname
Jenkins http://hostname/jenkins
SonarQube http://hostname/sonarqube
Web Selenium Hub http://hostname/selenoid/wd/hub
Mobile Selenium Hub http://hostname/mcloud/wd/hub
Mobile SmartTest Farm http://hostname/stf

admin/changeit crendetials should be used for Reporting and Jenkins, admin/admin for SonarQube.

Documentation and free support

License

Code - Apache Software License v2.0

Documentation and Site - Creative Commons Attribution 4.0 International License

carina-demo's People

Contributors

abialkevich avatar akamarouski avatar brutskov avatar denispitsul2020 avatar dependabot[bot] avatar dhreben avatar dimagrinevich avatar dmtgrinevich avatar fcosta20 avatar hursevich avatar ilya-varchenya avatar ivansnytko avatar kolyakrasnik avatar kschernopiatova avatar maksimsarychau avatar maseh87 avatar mohamadli avatar sandinosanchez avatar sergeizagriychuk avatar sergeybrenko avatar tsvrko avatar vdelendik 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

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

carina-demo's Issues

Test from cucumber-web.xml failed

Test from cucumber-web.xml failed in carina-demo because of
java.lang.AbstractMethodError: org.apache.logging.log4j.core.config.ConfigurationFactory.getConfiguration(Lorg/apache/logging/log4j/core/config/ConfigurationSource;)Lorg/apache/logging/log4j/core/config/Configuration;
But all steps passes and after that this error appears.
And during creating a project through archetype, the feature/GSMArenaNews.feature doesn’t exist in the project.

"Mobile test - testWebView" is failed

Steps:

  1. Start test job Carina Demo Tests - Mobile Sample (Android)
  2. Verify that all test are passed
    Actual result: "Mobile test - testWebView" is failed with error
    "20:55:04 [undefined] [ERROR] TEST [Mobile test - testWebView] FAILED at [17:55:04 2022-03-23] - no such element By.xpath: //*[@Class='t708__icon']
    For documentation on this error, please visit: https://www.seleniumhq.org/exceptions/no_such_element.html
    Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
    System info: host: 'd97b341b943c', ip: '172.19.0.4', os.name: 'Linux', os.arch: 'amd64', os.version: '5.4.0-1045-aws', java.version: '11.0.12'
    Driver info: driver.version: unknown

com.qaprosoft.carina.core.foundation.webdriver.locator.ExtendedElementLocator.findElement(ExtendedElementLocator.java:108)
org.openqa.selenium.support.pagefactory.internal.LocatingElementHandler.invoke(LocatingElementHandler.java:38)
com.sun.proxy.$Proxy34.click(Unknown Source)
com.qaprosoft.carina.core.foundation.webdriver.decorator.ExtendedWebElement$2.doClick(ExtendedWebElement.java:1391)
com.qaprosoft.carina.core.foundation.webdriver.decorator.ExtendedWebElement.executeAction(ExtendedWebElement.java:1276)
com.qaprosoft.carina.core.foundation.webdriver.decorator.ExtendedWebElement.overrideAction(ExtendedWebElement.java:1385)
com.qaprosoft.carina.core.foundation.webdriver.decorator.ExtendedWebElement.doAction(ExtendedWebElement.java:1380)
com.qaprosoft.carina.core.foundation.webdriver.decorator.ExtendedWebElement.doAction(ExtendedWebElement.java:1360)
com.qaprosoft.carina.core.foundation.webdriver.decorator.ExtendedWebElement.click(ExtendedWebElement.java:510)
com.qaprosoft.carina.core.foundation.webdriver.decorator.ExtendedWebElement.click(ExtendedWebElement.java:499)
com.qaprosoft.carina.core.foundation.webdriver.decorator.ExtendedWebElement.click(ExtendedWebElement.java:490)
com.qaprosoft.carina.demo.mobile.gui.pages.android.WebViewPage.goToContactUsPage(WebViewPage.java:22)
com.qaprosoft.carina.demo.MobileSampleTest.testWebView(MobileSampleTest.java:67)
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.base/java.lang.reflect.Method.invoke(Method.java:566)
org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:133)
org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:598)
org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:173)
org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46)
org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:824)
org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:146)
org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128)
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
java.base/java.lang.Thread.run(Thread.java:829)"

MobileUtils.Tap() method Not Working on iOS

Hi,

I am trying to click on button by using MobileUtils.tap it executed but doesn't perform any action on device.

inside tap method -
touchAction.press(startPoint).waitAction(waitOptions).release().perform(); is used
I tried alternative method -
touchAction.tap(PointOption.point(startx, starty)).release().perform();

But i am getting below exception :-
org.openqa.selenium.support.events.EventFiringWebDriver cannot be cast to io.appium.java_client.MobileDriver

please help me to resolve it.

adjust WebSampleTest to support execution vs mobile web

When we run our WebSampleTest on mobile browsers we have an exception:
Actual URL differs from expected one. Expected 'https://www.gsmarena.com' but found 'https://m.gsmarena.com/'

Our test code should identify it and register valid env url params for example:

env=DEMO
DEMO.base=https://www.gsmarena.com

MOBILE.base=https://m.gsmarena.com/

And reuse MOBILE for executions on devices...
Or handle everything programmatically and override somehow based on the form factor of the browser

11:45:33 [undefined] [ERROR] Nexus 6 - ZX1G425MHC TEST [GSM arena web tests - testCompareModels] FAILED at [08:45:33 2021-05-20] - Home page is not opened expected [true] but found [false]

org.testng.Assert.fail(Assert.java:99)
org.testng.Assert.failNotEquals(Assert.java:1037)
org.testng.Assert.assertTrue(Assert.java:45)
com.qaprosoft.carina.demo.WebSampleTest.testCompareModels(WebSampleTest.java:80)
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.base/java.lang.reflect.Method.invoke(Method.java:566)
org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:132)
org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:599)
org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:174)
org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46)
org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:822)
org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:147)
org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128)
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
java.base/java.lang.Thread.run(Thread.java:834)

update web and api tests according to the changes on gsm arena

  1. API-Demo-Test: 2 failures due to the
    Expected: a JSON array got: a JSON object org.skyscreamer.jsonassert.JSONAssert.assertEquals(JSONAssert.java:256) co....

  2. Web-Demo-Test: 2 failures due to the
    Unable to open model: ...

  3. Web-Demo-Test: 2 failures due to the
    stale element reference: element is not attached to the page document

new version should be fully passed

adjust cucumber sample test according to carina-cucumber:1.1 release

switch temporary to 1.0.3 carina-cucumber module until carina-demo code is migrated correctly
19:24:15 [ERROR] COMPILATION ERROR :
19:24:15 [INFO] -------------------------------------------------------------
19:24:15 [ERROR] /opt/jenkins/workspace/qaprosoft/carina-demo/Web-Demo-Test/src/test/java/com/qaprosoft/carina/demo/CucumberWebSampleTest.java:[5,20] package cucumber.api does not exist
19:24:15 [ERROR] /opt/jenkins/workspace/qaprosoft/carina-demo/Web-Demo-Test/src/test/java/com/qaprosoft/carina/demo/CucumberWebSampleTest.java:[7,2] cannot find symbol
19:24:15 symbol: class CucumberOptions
19:24:15 [ERROR] /opt/jenkins/workspace/qaprosoft/carina-demo/Web-Demo-Test/src/test/java/com/qaprosoft/carina/demo/cucumber/steps/GSMArenaNewsSteps.java:[15,28] package cucumber.api.java.en does not exist
19:24:15 [ERROR] /opt/jenkins/workspace/qaprosoft/carina-demo/Web-Demo-Test/src/test/java/com/qaprosoft/carina/demo/cucumber/steps/GSMArenaNewsSteps.java:[16,28] package cucumber.api.java.en does not exist
19:24:15 [ERROR] /opt/jenkins/workspace/qaprosoft/carina-demo/Web-Demo-Test/src/test/java/com/qaprosoft/carina/demo/cucumber/steps/GSMArenaNewsSteps.java:[17,28] package cucumber.api.java.en does not exist
19:24:15 [ERROR] /opt/jenkins/workspace/qaprosoft/carina-demo/Web-Demo-Test/src/test/java/com/qaprosoft/carina/demo/cucumber/steps/GSMArenaNewsSteps.java:[18,28] package cucumber.api.java.en does not exist
19:24:15 [ERROR] /opt/jenkins/workspace/qaprosoft/carina-demo/Web-Demo-Test/src/test/java/com/qaprosoft/carina/demo/cucumber/steps/GSMArenaNewsSteps.java:[25,6] cannot find symbol
19:24:15 symbol: class Given
19:24:15 location: class com.qaprosoft.carina.demo.cucumber.steps.GSMArenaNewsSteps
19:24:15 [ERROR] /opt/jenkins/workspace/qaprosoft/carina-demo/Web-Demo-Test/src/test/java/com/qaprosoft/carina/demo/cucumber/steps/GSMArenaNewsSteps.java:[32,6] cannot find symbol
19:24:15 symbol: class When
19:24:15 location: class com.qaprosoft.carina.demo.cucumber.steps.GSMArenaNewsSteps
19:24:15 [ERROR] /opt/jenkins/workspace/qaprosoft/carina-demo/Web-Demo-Test/src/test/java/com/qaprosoft/carina/demo/cucumber/steps/GSMArenaNewsSteps.java:[38,6] cannot find symbol
19:24:15 symbol: class Then
19:24:15 location: class com.qaprosoft.carina.demo.cucumber.steps.GSMArenaNewsSteps
19:24:15 [ERROR] /opt/jenkins/workspace/qaprosoft/carina-demo/Web-Demo-Test/src/test/java/com/qaprosoft/carina/demo/cucumber/steps/GSMArenaNewsSteps.java:[43,6] cannot find symbol
19:24:15 symbol: class And
19:24:15 location: class com.qaprosoft.carina.demo.cucumber.steps.GSMArenaNewsSteps
19:24:15 [INFO] 10 errors

when executing test via Internet Explorer browser, it is not showing consistent behavior.

When executing tests via the Internet Explorer browser, it is not showing consistent behavior.

Sometimes tests run successfully and sometimes it gives below error message.
Unexpected error launching Internet Explorer. IELaunchURL() returned HRESULT 80070005 ('Access is denied.') for URL 'http://localhost:40488/'

Currently using IE 32 bit and IE driver 32bit.

There is an issue of IE slowness type if both of them are not matched.

web_xml.txt

AnnotationTransformer not found

  1. Cloned this repo
  2. Executedmvn clean
  3. Executed api.xml TestNG Suite
Listener com.qaprosoft.carina.core.foundation.retry.AnnotationTransformer was not found in project's classpath```

Project license

Hello,

Can you specify the license of this project?

Thanks

Error when running test method using method2.invoke

Hi,

I was trying to launch test cases method by loading method class and then invoking method using method.invoke.
Below is the Test class

public class MobileSampleTest extends AbstractTest {

	@Test(description = "JIRA#DEMO-0011")
	@MethodOwner(owner = "qpsdemo")
	public void testLoginUser(HashMap<String,Object> testDetail) throws Exception {
		setApplicationPath();
               AppiumDriver driver = (AppiumDriver) testDetail.get("appiumDriver");
		String username = "Test user";
		String password = RandomStringUtils.randomAlphabetic(10);
		WelcomePageBase welcomePage = initPage(driver, WelcomePageBase.class);
		Assert.assertTrue(welcomePage.isPageOpened(), "Welcome page isn't opened");
		LoginPageBase loginPage = welcomePage.clickNextBtn();
		Assert.assertFalse(loginPage.isLoginBtnActive(), "Login button is active");
//		loginPage.typeName(username);
//		loginPage.typePassword(password);
		loginPage.selectMaleSex();
		loginPage.checkPrivacyPolicyCheckbox();
		CarinaDescriptionPageBase carinaDescriptionPage = loginPage.clickLoginBtn();
		Assert.assertTrue(carinaDescriptionPage.isPageOpened(), "Carina description page isn't opened");
	}

	private void setApplicationPath() {
		String pathToApp;
		String iosPath = "src/main/resources/carinademoexample.zip";
		String androidPath = "src/main/resources/carinademoexample.apk";
		if (Type.ANDROID_PHONE.getFamily().equalsIgnoreCase(R.CONFIG.get("capabilities.platformName")))
			pathToApp = androidPath;
		else 
			pathToApp = iosPath;
		File file = new File(pathToApp);
		Configuration.setMobileApp(file.getAbsolutePath());
	}
}

I want to pass hashmap with custom driver to method when invoking. I am using below code for launching test cases.

public class CarinaTest {
	
	public static void main(String[] args) {
		try {	
			String classToLoad = "com.qaprosoft.carina.demo.MobileSampleTest";
			String methodToLoad = "testLoginUser";
			
			 AppiumDriver appiumDriver = appiumManager.getDriver();
	
		     HashMap<String, Object> methodPayload = new HashMap<String, Object>();
		     methodPayload.put("appiumDriver", appiumDriver);
		     methodPayload.put("testJobId", 1);
		     
				
			Class cls = Class.forName(classToLoad);
			Method[] methods = cls.getMethods();
			Object obj = cls.newInstance();
			for (Method method2 : methods) {					
				if(method2.getName().contains(methodToLoad.trim())) {
					method2.invoke(obj, methodPayload);
				}
			}			
		} catch (Exception e) {
			e.printStackTrace();
		}	
	}
	
}

I am getting below error while invoking method:

java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
Caused by: java.lang.RuntimeException: There is no any class that satisfy to required conditions: [parent class - com.qaprosoft.carina.demo.mobile.gui.pages.common.WelcomePageBase], [device type - DESKTOP]
	at com.qaprosoft.carina.core.foundation.utils.factory.ICustomTypePageFactory.initPage(ICustomTypePageFactory.java:111)
	at com.qaprosoft.carina.demo.MobileSampleTest.testLoginUser(MobileSampleTest.java:31)
	... 5 more

When I run test as testng suite it works fine. But I am not able to launch as mentioned above.
Any help would be appreciated.

Thanks

Error message is present in Console log for API-Demo-Test

Tested via carina-core_version=6.4.37-SNAPSHOT, API-Demo-Test
Steps:

  1. Run API-Demo-Test
  2. Verify Console log
    Actual result: Error message is present
    ->
    [ERROR] Could not retrieve the last modification timestamp for the URI [http://webservices.oorsprong.org/websamples.countryinfo/CountryInfoService.wso?wsdl] from the HTTP URL connection. The [Last-Modified] header was probably not set correctly.

Pull request jobs run with errors after completed all default steps

[ERROR] Could not create local repository at /var/jenkins_home/.m2/repository -> [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/LocalRepositoryNotAccessibleException
Screen Shot 2019-11-26 at 9 28 39 PM

integrate carina-demo tests executioon on CI level for each new core build

need enhance CI process and run automatically for each core build (release/snapshot) all demo tests as part of the process.
for snapshots builds just executing all demo tests in additions to default unit tests should be enough
for release core builds we should setup full qps-infra containers from scratch and proceed with release when infrastructure is up and all demo tests pass

Tests failed with unexpected error "org.openqa.selenium.WebDriverException: unknown error: cannot determine loading status from target frame detached"

Env.: dev, tenant https://devtests.zebrunner.dev/projects/SYA/test-runs/34766/tests/36886?runsState=eyIjIjpudWxsLCJwcm9qZWN0S2V5IjoiU1lBIiwiYWN0aXZlVGVzdFJ1bklkIjozNDc2NiwiYWN0aXZlUHJvamVjdCI6bnVsbH0%3D. (will be deleted soon)

Steps:

Launch Web demo test with MicrosoftEdge=99.0
Verify that test run dosn't contain unexpected errors
Actual result: test case is failed with the following error message

org.openqa.selenium.WebDriverException: unknown error: cannot determine loading status from target frame detached (Session info: MicrosoftEdge=99.0.1150.30) Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03' System info: host: '48d776a62fbc', ip: '172.17.0.3', os.name: 'Linux', os.arch: 'amd64', os.version: '5.13.0-1017-aws', java.version: '11.0.14.1' Driver info: org.openqa.selenium.remote.RemoteWebDriver Capabilities {acceptInsecureCerts: false, browserName: msedge, browserVersion: 99.0.1150.30, javascriptEnabled: true, ms:edgeOptions: {debuggerAddress: localhost:36063}, msedge: {msedgedriverVersion: 99.0.1150.7 (ec99f135323d08..., userDataDir: /tmp/.com.microsoft.Edge.X8...}, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: LINUX, platformName: LINUX, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:virtualAuthenticators: true} Session ID: d2b5ee68298a3e1f1b469ad130b5c252 at jdk.internal.reflect.GeneratedConstructorAccessor31.newInstance(Unknown Source) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490) at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187) at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122) at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49) at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158) at com.qaprosoft.carina.core.foundation.webdriver.listener.EventFiringSeleniumCommandExecutor.execute(EventFiringSeleniumCommandExecutor.java:50) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552) at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:285) at org.openqa.selenium.remote.RemoteWebElement.click(RemoteWebElement.java:84) at jdk.internal.reflect.GeneratedMethodAccessor15.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWebElement.lambda$new$0(EventFiringWebDriver.java:404) at com.sun.proxy.$Proxy37.click(Unknown Source) at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWebElement.click(EventFiringWebDriver.java:417) at jdk.internal.reflect.GeneratedMethodAccessor15.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.openqa.selenium.support.pagefactory.internal.LocatingElementHandler.invoke(LocatingElementHandler.java:51) at com.sun.proxy.$Proxy34.click(Unknown Source) at com.qaprosoft.carina.core.foundation.webdriver.decorator.ExtendedWebElement$2.doClick(ExtendedWebElement.java:1397) at com.qaprosoft.carina.core.foundation.webdriver.decorator.ExtendedWebElement.executeAction(ExtendedWebElement.java:1276) at com.qaprosoft.carina.core.foundation.webdriver.decorator.ExtendedWebElement.overrideAction(ExtendedWebElement.java:1391) at com.qaprosoft.carina.core.foundation.webdriver.decorator.ExtendedWebElement.doAction(ExtendedWebElement.java:1386) at com.qaprosoft.carina.core.foundation.webdriver.decorator.ExtendedWebElement.doAction(ExtendedWebElement.java:1366) at com.qaprosoft.carina.core.foundation.webdriver.decorator.ExtendedWebElement.click(ExtendedWebElement.java:510) at com.qaprosoft.carina.core.foundation.webdriver.decorator.ExtendedWebElement.click(ExtendedWebElement.java:499) at com.qaprosoft.carina.core.foundation.webdriver.decorator.ExtendedWebElement.click(ExtendedWebElement.java:490) at com.qaprosoft.carina.demo.gui.components.FooterMenu.openNewsPage(FooterMenu.java:53) at com.qaprosoft.carina.demo.WebSampleTest.testNewsSearch(WebSampleTest.java:106) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:133) at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:598) at org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:173) at org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46) at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:824) at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:146) at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146) at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:829)``
Снимок экрана 2022-04-13 в 17 43 07

Switch carina-api demo tests to new approach with annotations

Currently all details for api methods are defined with old approach which uses super() constructor of AbstractApiMethods.
Needed to switch that to new approach based on annotations.
Also we can get rid of api.properties in such case.
That also should be reflected in carina-api documentation. Currently documented approach may be marked as [deprecated] in the doc. New instructions based on annotations should be added into existent paragraphs.

stale element exception during brand selection

repro in 7.3.20-SNAPSHOT carina. let's think maybe some improvements might be added in carina again after merging
zebrunner/carina#1683
zebrunner/carina#1677

with above changes our findElement might be restored again for doAction + stale element

TEST [GSM arena web tests - testModelSpecs [InvCount=0201]] FAILED at [15:38:20 2022-06-06] - stale element reference: element is not attached to the page document
  (Session info: chrome=100.0.4896.60)
For documentation on this error, please visit: https://www.seleniumhq.org/exceptions/stale_element_reference.html
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'd91065c920c3', ip: '172.17.0.2', os.name: 'Linux', os.arch: 'amd64', os.version: '4.14.262-200.489.amzn2.x86_64', java.version: '11.0.15'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Capabilities {acceptInsecureCerts: true, browserName: chrome, browserVersion: 100.0.4896.60, chrome: {chromedriverVersion: 100.0.4896.20 (f9d71f93d32a..., userDataDir: /tmp/.com.google.Chrome.THiq7i}, goog:chromeOptions: {debuggerAddress: localhost:44239}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: eager, platform: LINUX, platformName: LINUX, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:virtualAuthenticators: true}
Session ID: 01f449408395a09ed76953b49efb4909

java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)
org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122)
org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
com.qaprosoft.carina.core.foundation.webdriver.listener.EventFiringSeleniumCommandExecutor.execute(EventFiringSeleniumCommandExecutor.java:51)
org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:285)
org.openqa.selenium.remote.RemoteWebElement.click(RemoteWebElement.java:84)
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.base/java.lang.reflect.Method.invoke(Method.java:566)
org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWebElement.lambda$new$0(EventFiringWebDriver.java:404)
com.sun.proxy.$Proxy35.click(Unknown Source)
org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWebElement.click(EventFiringWebDriver.java:417)
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.base/java.lang.reflect.Method.invoke(Method.java:566)
com.qaprosoft.carina.core.foundation.webdriver.locator.internal.LocatingListsElementHandler.invoke(LocatingListsElementHandler.java:44)
com.sun.proxy.$Proxy32.click(Unknown Source)
com.qaprosoft.carina.core.foundation.webdriver.decorator.ExtendedWebElement$1.doClick(ExtendedWebElement.java:1427)
com.qaprosoft.carina.core.foundation.webdriver.decorator.ExtendedWebElement.executeAction(ExtendedWebElement.java:1306)
com.qaprosoft.carina.core.foundation.webdriver.decorator.ExtendedWebElement.overrideAction(ExtendedWebElement.java:1421)
com.qaprosoft.carina.core.foundation.webdriver.decorator.ExtendedWebElement.doAction(ExtendedWebElement.java:1416)
com.qaprosoft.carina.core.foundation.webdriver.decorator.ExtendedWebElement.doAction(ExtendedWebElement.java:1396)
com.qaprosoft.carina.core.foundation.webdriver.decorator.ExtendedWebElement.click(ExtendedWebElement.java:530)
com.qaprosoft.carina.core.foundation.webdriver.decorator.ExtendedWebElement.click(ExtendedWebElement.java:519)
com.qaprosoft.carina.core.foundation.webdriver.decorator.ExtendedWebElement.click(ExtendedWebElement.java:510)
com.qaprosoft.carina.demo.gui.pages.HomePage.selectBrand(HomePage.java:62)
com.qaprosoft.carina.demo.WebSampleTest.testModelSpecs(WebSampleTest.java:60)

Problem in running demo project

I am following http://qaprosoft.github.io/carina/execution/ steps

To run the test suite from Eclipse IDE, just select the required TestNG xml file: Right click > Run As > TestNG suite

An internal error occurred during: "Launching carina-demo_src.test.resources.testng_suites.web.xml".
org.testng.eclipse.maven.MavenTestNGLaunchConfigurationProvider.getClasspath(Lorg/eclipse/debug/core/ILaunchConfiguration;)Ljava/util/List;

I also get following error after change the version of eclipse

------------- Driver capabilities -----------

java.lang.NoSuchMethodError: org.testng.TestRunner.addListener(Ljava/lang/Object;)V
at org.testng.remote.support.RemoteTestNG6_9_10$1.newTestRunner(RemoteTestNG6_9_10.java:32)
at org.testng.remote.support.RemoteTestNG6_9_10$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG6_9_10.java:61)
at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:713)
at org.testng.SuiteRunner.init(SuiteRunner.java:260)
at org.testng.SuiteRunner.(SuiteRunner.java:198)
at org.testng.TestNG.createSuiteRunner(TestNG.java:1295)
at org.testng.TestNG.createSuiteRunners(TestNG.java:1273)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1128)
at org.testng.TestNG.runSuites(TestNG.java:1049)
at org.testng.TestNG.run(TestNG.java:1017)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:126)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:152)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:57)

adjust web sample test to be able to run on mobile web

16:38:38 [undefined] [ERROR] TEST [GSM arena web tests - testCompareModels] FAILED at [13:38:38 2022-03-31] - Home page is not opened expected [true] but found [false]

org.testng.Assert.fail(Assert.java:99)
org.testng.Assert.failNotEquals(Assert.java:1037)
org.testng.Assert.assertTrue(Assert.java:45)
com.qaprosoft.carina.demo.WebSampleTest.testCompareModels(WebSampleTest.java:83)
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.base/java.lang.reflect.Method.invoke(Method.java:566)
org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:133)
org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:598)
org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:173)
org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46)
org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:824)
org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:146)
org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128)
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
java.base/java.lang.Thread.run(Thread.java:829)

Build Failure

[INFO] Scanning for projects...
[INFO]
[INFO] ---------------------< com.qaprosoft:carina-demo >----------------------
[INFO] Building Carina Demo 1.0
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] Downloading from : https://repo.maven.apache.org/maven2/com/qaprosoft/carina-core/maven-metadata.xml
[INFO] Downloaded from : https://repo.maven.apache.org/maven2/com/qaprosoft/carina-core/maven-metadata.xml (3.4 kB at 5.0 kB/s)
[INFO]
[INFO] --- jacoco-maven-plugin:0.7.9:prepare-agent (default) @ carina-demo ---
[INFO] argLine set to -javaagent:/Users/shiva.ramraokadu/.m2/repository/org/jacoco/org.jacoco.agent/0.7.9/org.jacoco.agent-0.7.9-runtime.jar=destfile=/Users/shiva.ramraokadu/Downloads/carina-demo-master/target/jacoco.exec
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ carina-demo ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 8 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ carina-demo ---
[INFO] Compiling 13 source files to /Users/shiva.ramraokadu/Downloads/carina-demo-master/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] error: error reading /Users/shiva.ramraokadu/.m2/repository/com/qaprosoft/alice-client/1.1.0/alice-client-1.1.0.jar; zip file is empty
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9.064 s
[INFO] Finished at: 2018-09-28T10:28:34+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project carina-demo: Compilation failure
[ERROR] error: error reading /Users/shiva.ramraokadu/.m2/repository/com/qaprosoft/alice-client/1.1.0/alice-client-1.1.0.jar; zip file is empty
[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

API-Demo-Test job is failed

Steps:

  1. Start API-Demo-Test job from Jenkins
    Actual result: Job is faild

Log:
eflections - could not scan file api/users/_delete/rq.json in url file:/opt/jenkins/workspace/okamara/carina-demo/API-Demo-Test/target/test-classes/ with scanner TypeAnnotationsScanner

unable to run demo tests against empty maven repository

unable to download all dependencies against empty .m2 repo due to the missed

17:38:00 [ERROR] Failed to execute goal on project carina-demo: Could not resolve dependencies for project com.qaprosoft:carina-demo:jar:1.0: Could not find artifact javax.media.jai:com.springsource.javax.media.jai.core:jar:1.1.3 in central (https://repo.maven.apache.org/maven2) -> [Help 1]
17:38:00 [ERROR]

to be able to download it automatically we have to register "Spring plugins" repo:
https://mvnrepository.com/artifact/javax.media.jai/com.springsource.javax.media.jai.core/1.1.3

Sometimes logic in sequence of steps In Test is wrong

Env.: org, 7.3.20 carina
Steps:

  1. Start web sample test via launcher and branch 100-200
  2. Open Failed test
  3. Verify that all steps with warning, INFO, ERROR are in logical in sequence

Actual result: I see the following sequence: e.g. ERROR: Page can't be opened, then INFO: page is opened
Expected: sequence: e.g. ERROR: Page can't be opened, then no step INFO: page is opened
Снимок экрана 2022-06-06 в 18 47 49
Снимок экрана 2022-06-06 в 19 14 24
Снимок экрана 2022-06-06 в 19 42 41

switch back to RELEASE carina and regenerate archetype

as only 6.1.22 carina officially released we have to switch back to RELEASE core build in pom.xml.
for now carina and carina-demo in master have new ownership code which is incompatible with old core.
Also right after that we have regenerate carina archetype using latest carina-demo ources

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.