All Projects → erik-whiting → LuluTest

erik-whiting / LuluTest

Licence: GPL-3.0, GPL-3.0 licenses found Licenses found GPL-3.0 LICENSE GPL-3.0 LICENSE.txt
LuluTest is a Python framework for creating automated browser tests.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to LuluTest

zap
⚡ Delightful AppImage package manager
Stars: ✭ 354 (+2428.57%)
Mutual labels:  hacktoberfest2022
Neovim-from-scratch
📚 A Neovim config designed from scratch to be understandable
Stars: ✭ 3,825 (+27221.43%)
Mutual labels:  hacktoberfest2022
Hemmelig.app
Keep your sensitive information out of chat logs, emails, and more with encrypted secrets.
Stars: ✭ 183 (+1207.14%)
Mutual labels:  hacktoberfest2022
recipes
Application for managing recipes, planning meals, building shopping lists and much much more!
Stars: ✭ 3,570 (+25400%)
Mutual labels:  hacktoberfest2022
storybook-addon-mock
This addon allows you to mock fetch or XMLHttpRequest in the storybook.
Stars: ✭ 67 (+378.57%)
Mutual labels:  hacktoberfest2022
conteudos-tech
- Esse repositório foi criado por mim, Fernanda Souza, com o intuito de divulgar ferramentas gratuitas que possam auxiliar pessoas em seus estudos.
Stars: ✭ 62 (+342.86%)
Mutual labels:  hacktoberfest2022
test junkie
Highly configurable testing framework for Python
Stars: ✭ 72 (+414.29%)
Mutual labels:  testing-framework
doto-client
Track your progress and multiply efficiency
Stars: ✭ 41 (+192.86%)
Mutual labels:  hacktoberfest2022
PixelTest
Fast, modern, simple iOS snapshot testing written purely in Swift.
Stars: ✭ 56 (+300%)
Mutual labels:  testing-framework
CP-Snippets
Important codes/functions/snippets required frequently in CP
Stars: ✭ 18 (+28.57%)
Mutual labels:  hacktoberfest2022
E-Learning-freesite
This site is mainly design for those student who don't know how to start their journey in the field of programming
Stars: ✭ 57 (+307.14%)
Mutual labels:  hacktoberfest2022
FizzBuzz-Hacktoberfest-2021
🎃 Submit creative FizzBuzz solutions in any language you want! Open for beginners !
Stars: ✭ 17 (+21.43%)
Mutual labels:  hacktoberfest2022
projecthactoberfest
hactoberfest 2022
Stars: ✭ 32 (+128.57%)
Mutual labels:  hacktoberfest2022
aditof sdk
Analog Devices 3D ToF software suite
Stars: ✭ 61 (+335.71%)
Mutual labels:  hacktoberfest2022
aries-vcx
AriesVCX is a Rust framework for building web and mobile applications issuing, holding, presenting and verifying Verifiable Credentials in accordance to the standards set by Hyperledger Aries.
Stars: ✭ 33 (+135.71%)
Mutual labels:  hacktoberfest2022
netflix-show-generator
A tool for generating Netflix show image
Stars: ✭ 18 (+28.57%)
Mutual labels:  hacktoberfest2022
fotongo
Simple boilerplate for building Backend services like ExpressJS with GOFIBER ⚡️
Stars: ✭ 29 (+107.14%)
Mutual labels:  hacktoberfest2022
regressr
A command line regression testing framework for testing HTTP services
Stars: ✭ 35 (+150%)
Mutual labels:  testing-framework
generaptr
Generaptr is a node package that helps when starting up a project by generating boilerplate code for Express api.
Stars: ✭ 16 (+14.29%)
Mutual labels:  hacktoberfest2022
SquirrelJME
SquirrelJME is a Java ME 8 Virtual Machine for embedded and Internet of Things devices. It has the ultimate goal of being 99.9% compatible with the Java ME standard.
Stars: ✭ 148 (+957.14%)
Mutual labels:  hacktoberfest2022

Build Status Maintainability Test Coverage

LuluTest

LuluTest is an open source browser automation framework using Python and Selenium. It is relatively lightweight in that it mostly provides wrappers for 3rd party library methods that make browser automation and testing more intuitive. The ultimate goal of LuluTest is to get people writing robust automated browser scripts quickly by abstracting out the inherent complexities and peculiarities

Special Thanks

The following Github users have contributed in some way to LuluTest and I want to thank them so much for their time, effort, and skill.

@wangonya

@nicpayne713

@benjifs

@alwinaind

@ddrm86

@MarioHdpz

@FarhiaM

@CarolinaKinetic

Basic Usage

LuluTest is designed to support both white and black box testing. The functions provided will work as long as the machine running the scripts can access the pages under test.

The basic work flow for creating a test is as such:

  1. Create a Page object with the URL of the page to be tested.
  2. Create an Action object which will interact with elements
  3. Create an Element object for each element on the page that will be tested
  4. go to the page to be tested
  5. Create a Steps object of actions to take on a page
  6. Do the Steps
  7. Do your assertions

Example Usage

Below is an example test case:

import unittest

from LuluTest.lulu_exceptions import PageNotLoadedError
from LuluTest.page import Page
from LuluTest.element import PageElement
from LuluTest.action import Action
from step import Step, Do, DoStep, Steps


class ExampleTest(unittest.TestCase):
    def test_write_and_click(self):
        page = Page('http://erikwhiting.com/newsOutlet')
        actions = Action()
        page.elements = [
            PageElement(("id", "sourceNews"), "input box"),
            PageElement(("id", "transmitter"), "button"),
            PageElement(("id", "en1"), "english div")
        ]
        actions.go(page)
        actions.input_text(page.get_element("input box"), "Hello")
        actions.click(page.get_element("button"))
        english_div = page.get_element("english div")
        english_text = actions.check_element_text(english_div, "Hello")
        self.assertTrue(english_text)
        actions.close()

Alternatively, you can also build pages via either YAML or JSON and import them for use. For example, the above page can be modeled in newso_outlet.yml like such:

page:
  url: http://erikwhiting.com/newsOutlet
  elements:
    input_box:
      id: sourceNews
    button:
      id: transmitter
    english_div:
      id: en1

import this file into your test script to avoid writing element finding code:

# In a setup method:
base_path = os.getcwd()
prebuilt_pages_directory = base_path + '/fixtures/pages/'
page_configs = [
    prebuilt_pages_directory + 'news_outlet.yml',
    prebuilt_pages_directory + 'other_page.yml',
    prebuilt_pages_directory + 'even_another_page.json',
]
pages = page_factory.generate_pages(page_configs)

# Now all subsequent tests have access to this page object
def test_basic_usage(self):
    page = self.pages['news_outlet']
    actions = Action()
    actions.go(page)
    actions.input_text(page.get_element("input_box"), "Hello")
    actions.click(page.get_element("button"))
    english_div = page.get_element("english_div")
    english_text = actions.check_element_text(english_div, "Hello")
    self.assertTrue(english_text)
    actions.close()

Features

There are two main design philosophies driving the development of LuluTest:

  1. Hide the tedium and peculiarities inherent in browser automation from the test scripts themselves, allowing testers to write efficient and robust tests faster

  2. Simplify the test writing process as much as possible so non-technical users can contribute basic test cases while freeing technical users to focus on more technically complex issues.

These philosophies are implemented mostly by keeping the sometimes slow response time of web elements in mind. The project aims to avoid explicit waits and sleeps as much as possible.

LuluTest Architecture

Between December of 2019 and January of 2020, the LuluTest architecture was redesigned with better principles and implemented in a way as described in the picture below. If contributing, please do your best to adhere to the intended arhcitecture.

LuluTest Architecture

Future Work

The ultimate goal of LuluTest is to power a domain specific language to help facilitate communication between business and technical stakeholders about requirements and testing.

Contribution Guide

Please see the Contribution Guide

Set-Up Guide

For setting up a local environment to contribute to testing, please go to the Set-Up Guide

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].