automated-tests

Writing tests for an Android app that logs into Facebook

核能气质少年 提交于 2019-12-20 03:11:28
问题 My Android app uses FacebookSDK for login. It's the first screen, and you can't do anything unless you login. I want to write some Espresso tests to be ran on Greenhouse Continuous integration server. I searched and I found FBSDKTestUsersManager on iOS, but nothing similar on Android. What I plan to do is create a flavor of test and when that flavor is selected instead of a normal Facebook login button, I'd display a button that gets a test access token for the user, then brings them to the

How to pass parameter to maven test

倖福魔咒の 提交于 2019-12-20 02:58:05
问题 I have One test suite running in two environment. Sometimes, I would like to run tests in localhost:8080 and sometimes at localhost:8585. Jenkins run the tests by " mvn test " command. How could I pass the port by parameter? Something like "mvn test 8080". 回答1: I add a plugin on maven pom.xml <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> <systemProperties> <property> <name>fileName</name> <value>${fileName}</value> <

no such element: Unable to locate element: {“method”:“css selector”,“selector”:“body select[name='Accept']”}

[亡魂溺海] 提交于 2019-12-19 12:28:10
问题 I have this <li><a class="dropdown-item" href="{{route('user.invite_accept',[$user->id,1])}}">Accept</a></li> I am trying to click on it using laravel dusk I used select, click,clicklink But it doesn't work 回答1: Your selector seems to be wrong, it appears that you're trying to click a hyperlink which is represented by <a> tag while your CSS expression is looking for a <select> Try converting your locator to find element by link text like: driver.findElement(By.linkText("Accept")) or

Unable to create new remote session while testing an Android application with Appium

做~自己de王妃 提交于 2019-12-19 11:56:12
问题 I'm trying to run an Example of test scripts coded with java in Eclipse with Appium. I run Appium by npm (i'm using Appium 1.6.3, i'm not new to Appium i run it before on Mac and on windows without any problem but this time in Ubuntu it looks a bit different while it's not with the appium application but with console) appium --address 127.0.0.1 I'm using java-client-4.1.2.jar selenium-java-3.0.1.jar selenium-server-standalone-3.0.1.jar testng-6.9.10.jar And my java class is : import io.appium

Webdriver.IO - check in a non-blocking way whether an element exists

早过忘川 提交于 2019-12-19 11:45:09
问题 Rookie question. I am using webdriver.io to write Appium end to end tests. I am using these commands to check the presence of an element: $(selector) browser.waitForVisible(selector, timeout, waitForAppearOrDisappear); browser.element('selector') They all block my tests if the element is not found. How can I check whether an element exists in a particular moment without blocking the test execution? I cannot find anything in the (concise) documentation. PS. This should do the trick browser

How to hide FirefoxDriver (using Selenium) without findElement function error in PhantomDriver(headless browser)?

∥☆過路亽.° 提交于 2019-12-19 10:44:34
问题 I try to make hidden FirefoxDriver. According to my research I must use PhantomJSDriver but when I use PhantomJSDriver driver.FindElement statement no longer does not work. var options = new PhantomJSOptions(); options.AddAdditionalCapability("phantomjs.page.settings.userAgent", "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.94 Safari/537.36"); PhantomJSOptions p = new PhantomJSOptions(); var service = PhantomJSDriverService.CreateDefaultService();

TestNG.xml suite to include all packages all files

家住魔仙堡 提交于 2019-12-19 05:08:44
问题 Just about to implement a test framework with Maven+TestNG+Selenium. How do you declare a suite.xml that tells TestNG to run ALL tests? I've tried all these to no avail: <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" > <suite name="Toplevel TestNG configuration" verbose="10"> <test name="all"> <classes> <class name="*" /> </classes> </test> </suite> <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" > <suite name="Toplevel TestNG configuration" verbose="10"> <test name="all"

What do I have to do so that assertions won't block automated tests anymore?

China☆狼群 提交于 2019-12-19 03:29:09
问题 We run automated NUnit tests on our C# projects using hudson/jenkins on several virtual machines which run mostly unattended on some server. The tests involve starting several processes that exchange data, one of which is NUnit itself, the others created by the unit test. Sometimes, one of the developer checks in something that triggers an assertion ( Debug.Assert() ). This then pops up a message box, asking the user what to do. Usually those happen in one of the "external" processes created

Testing a Facebook Connect application using Selenium?

不羁岁月 提交于 2019-12-19 03:13:44
问题 Does anyone have experience using Selenium to automate testing of a webapp that uses Facebook Connect for user login? Any tips or methods that you recommend? 回答1: Depends what you want to do? Will you be using a real-real Facebook User (which is phone verified by Facebook)? Safest and most reliable ,but very difficult ( impossible ) to gather "real" users (phone verified by FB). In terms of defining aspects of the user/connections details, like education history, work history, name, age etc

Test Automation: How to simulate power failure/machine crash?

强颜欢笑 提交于 2019-12-19 03:13:23
问题 I have a delphi application that relies on SQLite3, a DB engine that's advertised as crash-proof. So far I was able to make my whole application crash-proof, but now I need to simulate brutal machine reboot / power failure. Obviously it would crazy/unpractical to brutally reboot my machine 100 times / per day just to conduct this test, so... I wonder if there's a way to simulate power failure using VirtualBox (or something similar) programmatically / in an automated fashion ? Any other method