Coder Social home page Coder Social logo

the-monkeys-and-maud / monkeytestjs Goto Github PK

View Code? Open in Web Editor NEW
13.0 13.0 5.0 1.51 MB

Automated functional testing for front end web developers

Home Page: http://monkeytestjs.io

License: MIT License

JavaScript 33.38% CSS 1.70% HTML 61.35% PHP 3.57%

monkeytestjs's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

monkeytestjs's Issues

Best way to load parts of config from external sources and setting workspace available scripts.

tl;dr:
load external code into config.js via $.getJSON/Script?
getting lo-dash loaded and running in workspace from within onLoadPage and setup?

Currently I'm trying to switch from Selenium based tests to this as the overhead seems much less and this should be much faster, however I'm trying to make the config to better suit my tests which were based around page objects but lack the understanding to do.
The first issue which I had was that that the config,js would become a pain to maintain due to various different information I need to have, so I thought that I could load parts of it by JSON or JavaScript. This I did via appending:

$.getJSON("test_assets/logins.json")
    .done(function(data){
        global.monkeytestjs.config.logins = data;
    });

in the config.js and it works fine. Is there a more appropriate way of doing this?
The larger issue I'm having is that I almost always need access to helper script functions in the workspace which use jQuery. With Selenium I just injected my own script before each test, however here I'm having trouble running such scripts in the workspace when their set in the config. For example I tried adding the following into the config,js:

fun: function(a) {
            $("#username").val(a);
        }

However when called from a test this seems to work only on the parent page, so how would I go about:

  1. giving the workspace a function/library before each tests with onLoadPage
  2. getting/setting a function/library and having them execute inside workspace when inside test code, more specifically from setup in a test
    e.g getting lo-dash loaded and running in workspace

Thanks for your time,
Alex

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.