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
<!-- image --> | |
// An example of running Pa11y programmatically | |
'use strict'; | |
var pa11y = require('pa11y'); | |
var url = 'http://localhost/search'; | |
// Create a test instance with some default options | |
var test = pa11y({ | |
parameters: { |
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
this.Given(/^I click the (.*) (button|filter|radio|tab|checkbox|link|icon|record|person|asset|accordion)$/, | |
function (elementId, callback) | |
{ var elm = element(by.css('#' + elementId)); | |
var EC = protractor.ExpectedConditions; | |
var isClickable = EC.elementToBeClickable(elm); | |
browser.wait(isClickable, 20000); | |
elm.click().then(callback); | |
}); |
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
#!/bin/bash | |
# Download and install JMeter | |
wget http://mirror.reverse.net/pub/apache//jmeter/binaries/apache-jmeter-3.3.tgz && wget https://www.apache.org/dist/jmeter/binaries/apache-jmeter-3.3.tgz.asc && wget -O - https://www.apache.org/dist/jmeter/KEYS |gpg --import && gpg --verify apache-jmeter-3.3.tgz.asc && tar -zxf apache-jmeter-3.3.tgz && rm apache-jmeter-3.3.tgz | |
# Run load test and create dashboard with stats and graphs | |
./apache-jmeter-3.3/bin/jmeter -n -t load-test-plan.jmx -l ../reports/html/jmeterreport2.jtl -e -o /dashboard" |
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
$context = stream_context_create( array( 'http' => array( 'follow_location' => false ) ) ); | |
$content = file_get_contents("http://xyogasangeetax.api.channel.livestream.com/2.0/latestclips.xml", false, $context); | |
$data = new SimpleXmlElement($content); | |
foreach($data->channel->item as $entry) | |
{ if ($media = $entry->children('media', TRUE)) | |
{ echo "<div style=\"width:160px;display:block;float:left;padding:15px;\">"; | |
$attributes = $media->content->attributes(); | |
$src = $play_attributes['url']; | |
if ($media->thumbnail) | |
{ $attributes = $media->thumbnail->attributes(); |
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
browser.setValue('#search-keywords', 'test'); | |
browser.click('#search-button'); | |
const links = $$('#search-result-row'); | |
links.forEach(function (link) { | |
let elem = link.getText(); | |
expect(elem).to.contain('test'); | |
}); |
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
env: | |
matrix: | |
- TESTTYPE=cucumber | |
- TESTTYPE=jmeter | |
- if [[ "$TESTTYPE" == "cucumber" ]]; then docker exec -ti par_beta_web bash -c "cd tests && /usr/local/n/versions/node/7.2.1/bin/npm run test:build"; fi | |
- if [[ "$TESTTYPE" == "jmeter" ]]; then docker exec -ti par_beta_web bash -c "cd tests/jmeter && ./apache-jmeter-3.3/bin/jmeter -n -t load-test-plan-travis.jmx -l ../reports/jmeterreport.jtl -e -o ../reports/dashboard"; fi |
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
X-Content-Type-Options nosniff; | |
X-XSS-Protection "1; mode=block"; | |
X-Frame-Options "SAMEORIGIN" always; |
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
this.Given(/^I should see quantity (.*) for product (.*) on the (.*) page$/, function(quantity, productid, sitepage, callback) { | |
var url, i; | |
switch (sitepage) { | |
case 'hardware section': | |
url = 'http://ashop.com/category/hardware-section/'; | |
i = 11; | |
break; | |
case 'product page': | |
url = 'http://ashop.com/category/hardware-section/product/1234/'; | |
i = 9; |
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
this.Given(/^I select (.*) from (.*)$/, function(selection, dropdown) { | |
// click on dropdown field to initiate dropdown element(by.css('.dropdown')).click().then(function () | |
{ | |
var dropdownField = element(by.id(dropdown)); | |
//clear the as-you-type field if already populated | |
dropdownField.clear().then(function() { | |
// enter text to search dropdown values | |
sendKeys(dropdownField, selection); | |
// click TAB button to exit (populated) field | |
return dropdownField.sendKeys(protractor.Key.TAB); |
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: required | |
os: osx | |
language: node_js | |
node_js: '7' | |
include: | |
- osx_image: xcode9.2 | |
env: DEVICE=10.2 | |
before_script: |
OlderNewer