automated-tests

How to run some but not all tests in a Perl test suite in parallel?

天涯浪子 提交于 2019-12-18 12:24:31
问题 I've got a Perl-based test suite with 10,000+ tests that I would like to make run faster. I've tested using the -j flag to prove , and I have found that most-but-not-all of my tests are ready to run in parallel. While I can work on making the remaining tests to be "parallel friendly", I expect there always be some tests which are not. What's a good way to manage this? I would like for it to be easy to run the whole set of tests efficiently, and make it easy to mark tests as "not-parallel

Trying to get ScalaTest working: “There are no tests to run” when doing “mvn test”

懵懂的女人 提交于 2019-12-18 11:59:33
问题 Edit: I finally got it to work!!! It needed a combination of JUnit in the pom.xml, and three statements in my .scala: import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner @RunWith(classOf[JUnitRunner]) For some reason, trying to configure Surefire makes the tests stop running again. I'm coding in IntelliJ, trying to get a simple ScalaTest test running via a Maven ( mvn test ) build process. There aren't any errors, but unfortunately no tests run either. Here is my .scala

TestNG dependsOnMethods from different class

☆樱花仙子☆ 提交于 2019-12-18 11:47:35
问题 The dependsOnMethods attribute of the @Test annotation works fine when the test to be depended upon is in the same class as that of the test that has this annotation. But it does not work if the to-be-tested method and depended-upon method are in different classes. Example is as follows: class c1 { @Test public void verifyConfig() { //verify some test config parameters } } class c2 { @Test(dependsOnMethods={"c1.verifyConfig"}) public void dotest() { //Actual test } } Is there any way to get

How to setup credentials for every project in Jenkins?

折月煮酒 提交于 2019-12-18 09:03:14
问题 I have some 10 projects in my Jenkins , each for 10 different clients . So i need to create credentials for all my projects , so that each client can access only their project . Is there any plugin to achieve my requirement .?? Please Help !!! 回答1: Select "Project-based Matrix Authorization Strategy" under Global Security Define general users, without access to projects at this level. Then on per-project select "Enable project-based security", and here you can give individual users addition

Publishing test results through command line test runner in VSTS

北战南征 提交于 2019-12-18 08:57:34
问题 I'm trying to use vstest.console.exe with the TfsPublisher logger in VSTS (cloud). There's a URL example shown in the article for TFS onsite, but I'm trying to work out what parameters to use for my VSTS build. The example is: /logger:TfsPublisher;Collection=http://localhost:8080/tfs/DefaultCollection;TeamProject=MyProject;BuildName=DailyBuild_20121130.1 But I just get an error saying the build cannot be found in the project, e.g. Error: Build "1234" cannot be found under team project

Select a date from date picker using Selenium webdriver

大城市里の小女人 提交于 2019-12-18 05:12:21
问题 I have a webpage with a textbox field. A calender icon near it. When i click on the calender icon a calender view is displayed. I think its not a jquery calender. Can anyone provide an example to automate this type of date pickers. 回答1: I tried this code, it may work for you also: DateFormat dateFormat2 = new SimpleDateFormat("dd"); Date date2 = new Date(); String today = dateFormat2.format(date2); //find the calendar WebElement dateWidget = driver.findElement(By.id("dp-calendar")); List

onchange event does not get fired on selenium type command

扶醉桌前 提交于 2019-12-18 04:47:19
问题 I am typing some value, on change do a total. But somehow, this event is not getting fired with selenium type command. I also tried typeKey and typeAt ..But no success. Any workaround for this ? 回答1: To trigger the onchange event, try adding this command in Selenium IDE: fireEvent targetID blur 回答2: Firefox has a bug which prevents some events from being executed while the browser window is out of focus. This could be an issue when you're running your automation tests - which might be typing

How to create Startup and Cleanup script for Visual Studio Test Project?

你。 提交于 2019-12-18 03:05:14
问题 I'm using a Visual Studio Test project, am modifying the test config with deployment files, etc. (through the VS GUI) and now I need to write a Startup script for the test run. I have no clue what language or file type or mechanism is used for these scripts. Need a tip. 回答1: Create a unit test in your test project. In the unit test class, create methods with the [TestInitialize] and [TestCleanup] attributes. They will be run before/after each test method. Or, if you want to run before/after

Selenium tests for Google maps

£可爱£侵袭症+ 提交于 2019-12-18 02:49:31
问题 Does anyone have a code example for a Selenium test (or some other browser testing environment) on a Google Maps API V3 map? Specifically, I want to interact with the markers and popup windows. 回答1: Solved. Not 100% elegant but it works. Set optimized : false on the markers. This makes them all appear on the map (docs). Then set the XPath selector in the Selenium test to '//div[@class="gmnoprint" and @title] , this will select all the markers. You can then interact with the markers. See also

Protractor, when should I use then() after a click()

▼魔方 西西 提交于 2019-12-18 02:48:38
问题 I'm running an Angular app and when testing on protractor a click() , I don't know when should I resolve the promise with a then() . I found this on Protractor API: A promise that will be resolved when the click command has completed. So, should I use click().then() in every click ? 回答1: So, should I use click().then() in every click? Definitely not. It's not needed because Protractor/WebDriverJS has this mechanism called "Control Flow" which is basically a queue of promises that need to be