Skip to content

Instantly share code, notes, and snippets.

View wellavelino's full-sized avatar
🎧
Focusing

Wellington Avelino dos Santos wellavelino

🎧
Focusing
View GitHub Profile
@wellavelino
wellavelino / logs.txt
Created April 7, 2020 12:29
screengrab_logs
[12:03:20]: Running tests for locale: ro
[12:03:20]: $ /Users/wavelinodossantos/Library/Android/sdk/platform-tools/adb -s emulator-5554 shell am instrument --no-window-animation -w \
-e testLocale ro \
-e endingLocale en_US \
-e appendTimestamp true \
-e package com.wellington.android.localization.screenshot \
com.wellington.android.test/com.wellington.android.utils.TestRunner
[12:03:32]: ▸ com.wellington.android.localization.screenshot.LocalizationScreenShot:.
[12:03:32]: ▸ Time: 10.522
[12:03:32]: ▸ OK (1 test)
@wellavelino
wellavelino / customFailureHandle.kt
Created January 30, 2020 09:43
Custom failure handle for espresso
import android.os.Environment.DIRECTORY_DOCUMENTS
import android.os.Environment.getExternalStoragePublicDirectory
import android.util.Log
import android.view.View
import androidx.test.espresso.AmbiguousViewMatcherException
import androidx.test.espresso.EspressoException
import androidx.test.espresso.FailureHandler
import androidx.test.espresso.InjectEventSecurityException
import androidx.test.espresso.PerformException
import androidx.test.espresso.core.internal.deps.guava.base.Throwables.throwIfUnchecked
@wellavelino
wellavelino / gnib_check
Created October 29, 2019 10:08
gnib_check.sh
#!/bin/bash
BOT_TOKEN=""
CHAT_ID=""
MESSAGE=""
LAST_MESSAGE=""
COUNT=0
while true; do
slot=$(curl -ks https://burghquayregistrationoffice.inis.gov.ie/Website/AMSREG/AMSRegWeb.nsf/\(getApps4DTAvailability\)\?readform\&\&cat\=Other\&sbcat\=All\&typ\=Renewal)
@wellavelino
wellavelino / report_join.rb
Last active September 23, 2020 09:11
report join
require 'nokogiri'
require 'find'
class JunitMerge
FAILURES_DIR = 'artifacts/composer-output/failures/'.freeze
REPORT_DIRECTORY = 'artifacts/composer-output/'.freeze
COLLATED_REPORT = 'artifacts/composer-output/junit4-reports/collated_report.xml'.freeze
OUTDATED_REPORTS = 'artifacts/composer-output/junit4-reports'.freeze
def run
@wellavelino
wellavelino / rerun.rb
Created July 22, 2019 16:29
re_run_failures
require 'nokogiri'
def re_run_failed_tests(report_dir, retry_count = 3)
count = 0
loop do
puts "Starting test execution number: #{count}"
failures = check_for_failures(report_dir)
parsed_test_failures = failures.join(",")
test_output = "artifacts/composer-output/failed-retry#{count}"
@wellavelino
wellavelino / screnshots_pull.groovy
Created July 18, 2019 09:43
gradle pull screen shots
// Basead on https://github.com/zawadz88/ScreenshotCapturingSample/blob/master/app/build.gradle
def reportsDirectory = "artifacts/composer-output"
def embedScreenshotsTask = task('embedScreenshots', group: 'reporting') {
dependsOn {
fetchScreenshotsTask
}
doFirst {
def reportsDirectory = "$buildDir/artifacts/composer-output"
def embedScreenshotsTask = task('embedScreenshots', group: 'reporting') {
dependsOn {
fetchScreenshotsTask
}
doFirst {
println new File(reportsDirectory, 'screenshots/failures')
@wellavelino
wellavelino / it_companies.txt
Last active June 5, 2019 15:28
IT companies
https://newrelic.com/about/careers
https://www.twilio.com/company/jobs#open-positions
https://company.ding.com/careers/
https://careers.shutterstock.com/teams/technology/
http://www.top1000.ie/industries/technology
task :run_features, [:feature, :scenario] do |_task, args|
puts "Running #{args[:feature]} feature with #{args[:scenario]} scenarios and report"
sh "cucumber -t @#{args[:feature]} -t @#{args[:scenario]} -f html -o #{args[:scenario]}_scenarios.html"
end
task :run_features, [:feature, :scenario] do |_task, args|
puts "Running #{args[:feature]} feature with #{args[:scenario]} scenarios "
sh "cucumber -t @#{args[:feature]} -t @#{args[:scenario]}""
end