• Stars
    star
    208
  • Rank 185,123 (Top 4 %)
  • Language
    Java
  • Created over 11 years ago
  • Updated 10 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Selenium Tests

This repository contains Selenium tests for the Wikia App.

Dependencies

  1. Make sure you have Java installed on your system, if not follow the vendor instructions for installing them on your operating system.
  2. Enable LOMBOK plugin on your IDE, follow the vendor instructions for installing LOMBOK for your IDE.
  • For eclipse follow this instruction
  • For IntelliJ Idea:
    • Windows: click Settings -> Plugins -> Browse repositories for "lombok" -> Install. Restart IntelliJ.
    • OSX: click IntelliJ IDEA -> Preferences -> Plugins -> Browse repositories for "lombok" -> Install. Restart Intellij.
  1. Go to "Annotation Processors"

    • Windows: click Settings -> Build, Execution, Deployment -> Annotation Processors. Set "Enable annotation processing".
    • OSX: click Intellij IDEA -> Preferences -> Build, Execution, Deployment -> Compiler -> Annotation Processors. Set "Enable annotation processing".
  2. Install IDE configurations from Wikia's Java Coding Guidelines

Adding Tests

Please remember to keep this repository up to date as the tests become worthless otherwise. A good rule of thumb is to add a new test that covers whatever bug you're fixing so we can track regressions on it. Also, make sure to code your tests in a cross-operating system compliant manner as it's valid to run them in Windows, Mac or Linux environments.

Running Tests

The following steps should get you set up for running Selenium tests locally on your machine:

  1. Clone this repository to your local machine (not your devbox).
  2. Clone selenium-config repository to your local machine.
  3. Copy config_default.yml file and name it config.yml (this will be your local config)
  4. Modify credentialsPath property in config.yml to point to credentials.xml file from cloned selenium-config repository
  5. In selenium-tests repository run gradle wrapper:
    ./gradlew test -Dbrowser=<browser> -Denv=<environment> -Dgroups=<group>

It is also possible to run mobile tests on real devices (Currently only Android is supported). In case of running tests on real devices additional parameters are supported:

  1. -Dplatform - determine if IOS or ANDROID should be used
  2. -Dplatform-version - get device's uuid from mobile config for provided platform version
  3. -Ddevice-id - get device with provided uuid

If both platform-version and device-id are provided device with provided uuid would be chosen.

Example commands

All commands must be run from the selenium-tests directory cloned during setup process above

Running tests on preview for mediawiki119 wikia
./gradlew test -Denv=preview -Dgroups=Login
Running tests on production for mediawiki119 wikia
./gradlew test -Denv=prod -Dgroups=Login
Running tests on devbox for muppet wikia
./gradlew test -Dbrowser=CHROME -Denv=<devbox-name> -Dwiki-name=muppet -Dgroups=Login
Running tests on local instance of Mercury (which fetches data from devbox) for muppet wikia on a Chrome pretending to be an Android device forcing Mercury skin
./gradlew test -Dbrowser=CHROMEMOBILEMERCURY -Denv=dev-karol -Dwiki-name=muppet -Dgroups=Login

If everything goes right it should log in as a QATestsUser.

Running tests on real device
./gradlew test -Dplatform=ANDROID -Ddevice-id=0243e69a8ec7e8de -Dgroups=MobileLogin

./gradlew test -Dplatform=ANDROID -Dplatform-version=4.4 -Dgroups=MobileLogin

Parameters

The following are valid test parameters:

  • -Dbrowser - Which browser to use, for example "CHROME"
  • -Denv - The environment on which the test(s) should be run in, for example prod, preview, dev-<name>, sandbox-<number>,
  • -Dwiki-name - The wiki where the test(s) should be run on, for example "mediawiki119", "muppet"
  • -Dgroups - (Optional) Which test groups to run, for example "Chat". Optional. Uses all tests if omitted
  • -Ddisable-flash - (Optional) Disable Flash plugin, any String value = true

Browsers

The following are valid for use in the -Dbrowser parameter:

  • FF
  • CHROME
  • CHROMEMOBILEMERCURY
  • IE
  • GHOST (phantomjs)

Groups

Whole group of tests can be run with -Dgroups parameter. Groups are declared as annotation @group() above the tests.

Reading Logs

Most tests write logs and take screenshots while they run which provide further information about what happened if they failed. These files reside in the ./logs directory and can be viewed locally in your browser by navigating to that folder.

More Repositories

1

app

Wikia Application Code
PHP
203
star
2

sroka

Python library for API access and data analysis in Product, BI, Revenue Operations (GAM, GA, Athena etc.)
Python
71
star
3

discreETLy

ETLy is an add-on dashboard service on top of Apache Airflow.
Python
69
star
4

ponto

A native iOS (Obj-C) and Android (Java) to Webview (JavaScript) bridge for exchanging data across contextes.
Objective-C
49
star
5

vignette

A Clojure library for thumbnail generation and storage.
Clojure
31
star
6

ad-engine

TypeScript
23
star
7

dropwizard-logstash-encoder

Java
18
star
8

design-system

Design System for Wikia
JavaScript
12
star
9

mobile-wiki

Wiki pages on mobile web
JavaScript
12
star
10

jwplayer-fandom

JWPlayer configuration
JavaScript
11
star
11

opentracing-php

PHP
11
star
12

guidelines

Guidelines for contributing to Wikia's projects
Shell
9
star
13

jenkins-webhooks

Flask app for triggering Jenkins builds by GitHub webhooks
Python
7
star
14

racktables-api

REST API for racktables
PHP
7
star
15

nsq-traefik-consumer

Consumer for NSQ which forwards Traefik access logs to InfluxDB
Go
7
star
16

react-common

Wikia's Reusable React components.
JavaScript
7
star
17

konfigurator

Simple tool for managing K8S Deployment configuration (ConfigMaps, Secrets, Deployments)
Go
6
star
18

jira-reporter

Automatically reports application errors (sent to ELK) as JIRA tickets
Python
6
star
19

interactive-maps

interactive-maps
JavaScript
6
star
20

Mike

Mycroft Holmes (High-Optional, Logical, Multi-Evaluating Supervisor) aka Mike
Python
6
star
21

ios-modular-example

Python
6
star
22

sonar-php-rules

Custom rules for analyzing PHP with SonarQube
Java
5
star
23

data-science-toolkit

A place for one-off data science and NLP scripts
Python
5
star
24

simplehtmldom

A simple PHP HTML DOM parser written in PHP5+, supports invalid HTML, and provides a very easy way to handle HTML elements.
HTML
5
star
25

WP7-API

C# library for Mediawiki API compatible with Windows Phone 7
C#
5
star
26

athena_alerter

Notification tool for AWS Athena
Python
5
star
27

tracking-opt-in

JavaScript
4
star
28

post-quecast

Post Message based Queued Broadcast
TypeScript
3
star
29

weppy

client-side library for reporting performance data
JavaScript
3
star
30

wiva

Wikitext Validator hackathon project
Python
3
star
31

WikiaAuthority

Hosts the authority app and older authority code
Python
3
star
32

style-guide

Common patterns and components for Wikia front end web applications
CSS
3
star
33

dfp-query-tool

PHP
2
star
34

ios-uitests-example

Swift
2
star
35

parsoid-ucp

📝 New Parsoid deployment
PHP
2
star
36

marathon-toolbox

Java
2
star
37

sonar-js-rules

Custom rules for analyzing JavaScript with SonarQube
Java
2
star
38

react-design-system

Wikia's Reusable React components.
JavaScript
2
star
39

python-commons

Common Python libraries to share between projects at Wikia
Python
2
star
40

fluent-sql-php

PHP
2
star
41

wiki-recommender

Flask App that uses LDA topics to recommend similar wikis
Python
2
star
42

AlphaB

Python library for rendering charts and computing statistics for A/B testing
Jupyter Notebook
2
star
43

go-commons

Go
2
star
44

identify_wiki

Python
2
star
45

gmap

JavaScript
2
star
46

post-editor

Quill-based editor for posts and replies
JavaScript
2
star
47

design-system-i18n

Localization messages for design system components
2
star
48

schema-org-graph

Map articles metadata and relationship to schema.org entities and stores them in graph database
Python
2
star
49

nlp_services

API and reusable services for NLP work
Python
1
star
50

ganglia_memcached

a script that can be run via cron to record ganglia metrics.
Perl
1
star
51

automated-tests

Java
1
star
52

marathon-event-metrics

A simple Marathon -> Influxdb reporter
JavaScript
1
star
53

username-suggestor

JavaScript
1
star
54

go-service-example

This is a template for simple golang HTTP service with most common bits and pieces
Go
1
star
55

skin-hydra

Less
1
star
56

ember-performance-sender

Extend Ember.js to easily send performance metrics
JavaScript
1
star
57

fandom-global-elements

Fandom global elements
HTML
1
star
58

fileserverImgTools

C
1
star
59

Wikia-ubuntu-unity-scope

Ubuntu unity Wikia scope
C++
1
star
60

search-suggestions-prototype

CSS
1
star
61

wikidiff2

PHP
1
star
62

kernel-configs

linux kernel configs for custom kernel builds at wikia
1
star
63

vignette-js

Client-side interface for interacting with https://github.com/Wikia/vignette
JavaScript
1
star
64

node-dashboard

JavaScript
1
star
65

kapajira

Kapacitor and Jira Integration
Python
1
star
66

data-flow-graphs

An open repository with scripts used to generate data-flow-graphs
Python
1
star
67

ad-products

DEPRECATED, CODE MOVED TO @Wikia/ad-engine
JavaScript
1
star
68

OurWikia

A Django app in homage to Reddit using Wikia's API data
CSS
1
star
69

ganglia-log-metric

Produces a set of metric from a log file based on regular expression
Perl
1
star
70

shortcuts_presentation

This repository contains tips and shortcuts in Intellij for JUG (JAVA USER GROUP) presentation.
Java
1
star
71

WikiaBrackets

Standalone bracket service
Python
1
star
72

skin-exvius

CSS
1
star
73

consul-tools

Python scripts for monitoring and manipulating data in consul
Python
1
star
74

docker-php

PHP client for Docker API generated from Docker's OpenAPI spec
PHP
1
star
75

metrics-fetcher

Tool which pulls metrics from services registered in Consul and send them aggregated to InfluxDB/telegraf
Go
1
star
76

second-eyes

Centralized event logging router
1
star
77

careers-page

A Wordpress-based application used by Wikia Poland to host our recruitment/careers info.
PHP
1
star
78

visit-source

Get source of visit and store in Cookie
JavaScript
1
star