This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.testng.annotations.* | |
import org.testng.TestNG | |
import org.testng.TestListenerAdapter | |
@Grab(group='org.testng', module='testng', version='5.7', classifier='jdk15') | |
class HogeTest { | |
@Test | |
void add() { | |
assert 1 + 1 == 2 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>myappJMeterTest</groupId> | |
<artifactId>myappJMeterTest</artifactId> | |
<version>0.0.1-SNAPSHOT</version> | |
<name>patsatJMeterTest</name> | |
<description>JMeter tests for testing myapp APIs.</description> | |
<repositories> | |
<repository> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Using Ansible, given scenario with 3 hosts: vbox1, vbox2, and vbox3, this guide will teach you to do the | |
following Ansible tasks: | |
A. Configure Ansible | |
B. Define remote slave servers by group | |
C. Run any shell commands on your remote servers by their group name | |
D. Create a Apache playbook to install Apache2 on all of your remote servers | |
E. SCP files out to your remote servers | |
F. Create a new blank role directory structure for you to write your own Role and publish it to "Ansible Galaxy" for re-use. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class FactoryDataProviderTestBase extends MyTestBase | |
{ | |
@Factory(dataProvider = "dp") | |
public FactoryDataProviderTestBase( SauceTestHelper helper, | |
Map<String,String> csvArgMap ) { | |
super( helper, csvArgMap ); | |
} | |
@DataProvider( name = "factory" ) | |
static public Object[][] factoryDataProvider() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.saucelabs.testng; | |
import com.saucelabs.common.Utils; | |
import org.json.simple.JSONArray; | |
import org.json.simple.JSONObject; | |
import org.json.simple.parser.JSONParser; | |
import org.json.simple.parser.ParseException; | |
import org.testng.annotations.DataProvider; | |
import java.lang.reflect.Method; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Boolean elementExistsWithText(By locator, String text) | |
{ | |
ExpectedCondition<Boolean> textToBePresentInElement = ExpectedConditions.textToBePresentInElementLocated(locator, text); | |
WebDriverWait wait = webDriverManager.getCachedWebDriverWait(webDriverManager.DEFAULT_WAIT); | |
try { | |
wait.until(textToBePresentInElement); | |
return Boolean.TRUE; | |
} catch ( WebDriverException wde ) { | |
LOG.debug( "Element '" + locator.toString() + "' with text '" + text + "' was not present.", wde); | |
return Boolean.FALSE; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rake' | |
require 'rake/testtask' | |
# uses '--' args format because ruby 'optparse' lib wants it that way | |
# runs myapp tests with args client, env, and application | |
namespace :myapp do |args| | |
desc "Example test task." | |
Rake::TestTask.new do |t| | |
t.name = "runTestsReal" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
E|-7p5p4-5-7-5-4-7-5-----------10-8-7------------------| | |
B|-------------------6----------------10-9h10p9--------| | |
G|---------------------7-4--10------------------10-7---| | |
D|---------------------------------------------------9-| | |
A|-----------------------------------------------------| | |
E|-----------------------------------------------------| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From https://github.com/djangofan/yet-another-selenium-framework | |
package qa.se.framework; | |
import org.openqa.selenium.WebDriver; | |
import org.openqa.selenium.remote.CapabilityType; | |
import org.openqa.selenium.remote.DesiredCapabilities; | |
import org.openqa.selenium.remote.RemoteWebDriver; | |
import org.openqa.selenium.support.ui.Sleeper; | |
import org.testng.ITestContext; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install galternatives | |
sudo add-apt-repository ppa:ferramroberto/java | |
sudo apt-get update | |
sudo apt-get install sun-java6-jdk sun-java6-plugin | |
(then use Gnome galternatives GUI to set the default) | |
OR on the pure command line: | |
sudo add-apt-repository ppa:ferramroberto/java | |
sudo apt-get update |
OlderNewer