automation

Parallel Test Execution Jenkins

旧时模样 提交于 2019-12-24 06:22:48
问题 I have some automated tests that I'm running using Jenkins. I've Jenkins connected to my GitSwarm which pulls the code from my branch and then exectutes it. I have installed the "Parallel Test Job Execution Plugin" for Jenkins. In the plugin I have specified the tests to run in 3 batches Is there anything else I should specify? I didn't think I would have to since I'm connecting to GitSwarm to run the code. The console output seems to state otherwise ! Building in workspace C:\Jenkins\jobs

Git pre-push hook to reject string addition in overall changes

血红的双手。 提交于 2019-12-24 06:10:24
问题 How would you write a pre-push hook that rejects pushing when the overall diff introduces a specific word/sentence/string? Motivating use-case: committing TODO notes (marking tasks to complete before pushing) letting git prevent me from forgetting to address said notes when pushing Notes: I have seen a lot of different questions and answers but none come close. The ones that try quickly fail on edge cases (e.g. this and this). notice that "overall diff" means that commits adding TODO would be

How to group together certain tests or files when doing a run in Cypress?

混江龙づ霸主 提交于 2019-12-24 05:56:16
问题 I am currently running Cypress and I have folders inside of it, where I have tests located for different applications. I have a folder entitled "smhw-qa" which contains sub-folders and tests files for this specific application. This directory apps will also include other applications too in future. What I wish to do In order to avoid having to run every test for a run, I wish to only run this specific folder. The location of the folder is as such: 'cypress/integration/apps/smhw-qa' Over time,

Exposing a Custom Control to Coded UI Tests - WinForms

拈花ヽ惹草 提交于 2019-12-24 04:23:05
问题 I wrote my own custom control in WinForms. It's actually works like a TextBox, but have other methodes and extra properties that I wrote. I tried writing a very simple coded UI test for this control but faild. Every Time I select it with the Coded UI Test Builder it is shown as "Client" and not as a textbox. I cannot read or write to the text property of this control, or get or set other properties. Do you know how do I expose my custom control for testing, and getting and setting all of it

Ruby win32ole - how to pass a VARIANT parameter?

本秂侑毒 提交于 2019-12-24 03:58:06
问题 I am trying to automate the Windows Task Scheduler using Ruby. I am using Ruby 1.8 under Windows Vista. The RegisterTaskDefintion method of the TaskFolder object takes two VARIANT parameters for the username and password. Any attempt to pass a string into these parameters results in a 'method_missing' exception: This does not work: rootFolder.RegisterTaskDefinition("Task", newTask, TASK_CREATE_OR_UPDATE, 'user', 'password', TASK_LOGON_PASSWORD, nil) This works: rootFolder

login to yahoo email account using Python Selenium webdrive

狂风中的少年 提交于 2019-12-24 03:53:12
问题 I need to login to yahoo email account using Selenium with Python. this is my code from selenium import webdriver from selenium.webdriver.common.keys import Keys driver = webdriver.Firefox() driver.get("https://login.yahoo.com") print driver.current_url logintxt = driver.find_element_by_name("username") logintxt.send_keys("email") pwdtxt = driver.find_element_by_name("passwd") pwdtxt.send_keys("pass") button = driver.find_element_by_id("login-signin") button.click() driver.get("https://mail

How to identify admins on Jenkins using groovy scripts

与世无争的帅哥 提交于 2019-12-24 03:28:22
问题 I want to be able to check whether the current build user who is running the job is admin or not. I used some APIs to figure out the admins user list as shown below import jenkins.model.Jenkins import hudson.model.User import hudson.security.Permission allUsers = User.getAll() adminList = [] for (u in allUsers) { if (u.hasPermission(Jenkins.ADMINISTER)) { // if (u.canDelete()) { adminList.add(u) } } println allUsers println adminList but always both the list of users (admins and average-joes)

QTP - testing while browser/page title changes

喜你入骨 提交于 2019-12-24 03:19:12
问题 I am trying to make simple testing but failed because I have no clue how to handle with browser title that changes during the testing. Simple example: Google>Find "blabol" Once its done, the browser title in QTP changes its name to "Google - results....". This is obviously problem when the search text is a variable that changes between iterations because the browser text is hardcoded. I would need something like "this browser" and "this page", if you get what I mean. Thanks 回答1: In a couple

How can I get the name of a Visual Basic control given its HWND?

孤街浪徒 提交于 2019-12-24 02:59:36
问题 I'm working on a little macro record/replay tool which can automate a few very old Visual Basic 6 GUIs we have. To do so, I'm identifying the controls by their name (the value of the name property of a control, that is). One part of this tool needs to determine the name of a control given its HWND. For newer Visual Basic applications which were done using VB.NET, I can use the WM_GETCONTROLNAME window message. This works nicely. However, this message is not understood by older windows. Is

Call COM add-in via VBA in excel

*爱你&永不变心* 提交于 2019-12-24 02:47:06
问题 I have a COM add-in written in VSTO that I want to call using a VBA macro. With the add-in I need to launch it, enter some text (automatically), then run the application. The add-in is all push button, and I can't readily access the code as some of it is encrypted (it is 3rd party). Regrettably the record function doesn't pick up any activity when clicking this add-in, and I've been unable to add it to the references list on the VBA. I've tried several ways of doing this and none have worked