Giter Club home page Giter Club logo

sakai-selenium's Introduction

Sakai-Selenium

##Overview This is a webapp to allow for easy upload of customizable selenium scripts generated from the Selenium IDE. This structure is meant to make it easier for organizations with limited technical QA personnel to move away from manual testing and towards the world of automated testing. This app allows users to upload Selenium scripts (which are checked against the format generated by the Selenium IDE), and URLs to run these scripts against. Users can then enter the app and run these scripts on any of the URLs that have been uploaded currently, and see the resultant output. Whether these scripts are full-blown tests or snippets to prepare manual tests, this app allows users to reuse commonly used clicks, or to actively develop a QA system. Also great for classes to develop a very lightweight, fast and easy storage platform for autmoated testing. ##Future Versions We would like to eventually have the following features in this app:

  1. We would like to fully sandbox the running of these scripts using pypy's sandoxed version, to ensure safety from custom scripts (this would allow for more flexibility in terms of what selenium files users could upload)

  2. We would like to allow an option for users to change the values of field entries (e.g. username, password, poll name) from the client side display

  3. We would like the parameters of an uploaded script to be stored along with the script in the database.

  4. We would like to do more pre-processing of the script in the server, so that users do not have to manually change the URL and add certain scripts

  5. We would like to move off of the unittest framework (unittest.main is a nightmare), and call individual methods, rather than have several workarounds to fit with the unittest.main function.

##Developer To run server, go to Sakai-Selenium/myproject and run

sudo python manage.py runserver 0.0.0.0:80

required dependencies are Python 2.7, Django 1.8, Selenium and firefox

To generate a script, download the firefox extension selenium-IDE, and record your clicks and actions. Then go to File/Export and export the script as a python unittest.

Your script must be uploaded from the Selenium IDE (or using the same import structure, as listed below), to help ensure that harmful code snippets are not accidentally run.

from selenium import ....
from selenium import ....
import unittest, time, re...

##Uploading Scripts Make a script through the Selenium IDE, and make sure that the sakai window on firefox is fully expanded when creating these.

export the script as python/unittest/webdriver script and save it.

If you want the URL your script is tested on to be variable (i.e. they can be changed on the frontend), follow the steps below. Otherwise, please put the URL your script is running on in the title of the script (should automatically be there)!

inside your script, before uploading, add the lines:

url = sys.argv[1]
del sys.argv[1]

and replace the line:

self.base_url = "http://xxx.xxx/"

with

self.base_url = url

Your saved script should then be good to upload and run thorugh the portal.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.