Package: humanframework
Human Framework: Test Automation Framework for Humans™NOTICE: Human Framework is still in theProof-of-ConceptstageCONTRIBUTE! I am releasing Human Framework under GPLv3 which makes it open source and free.Contribute by:Localization of training data (translation)Adding more intents and actionsReporting bugsSuggesting new featuresNOTICE: I am working on aRasa NLUsupportHuman Framework is a test automation framework designed for testers without software programming background by allowing them to write test steps or instructions in their own language like English.Human Framework uses Natural Language Understanding (NLU) for intent classification and entity extraction to be able to perform specific actions.
It currently depend onMicrosoft LUIS (Language Understanding).Below is an example of test instructions that Human Framework can understand.
To get an idea of what specific sentences are supported, check the the content oftrialsandtestsfolder.Open chrome browser https://devpost.com
Page title should be "Devpost - The home for hackathons"
Page should contain link "About"
Click link "About"
Page title should be "About us · Devpost"
Close browserLUIS (and other NLU tools) makes it possible to write test cases on any human language.
Current version of Human Framework only supports English.Human Framework was inspired byRobot Frameworkbut leans towards
Natural Language Processing (NLP) for writing test cases."Human Framework is the Siri or Alexa of automation testing." (minus the voice, but it is possible in the future)How it worksThe architecture of Human Framework can be simplified into 2 steps- Intent Classification and Action Execution:Human Framework reads the test case files and then uses an Intent Classifier (e.g. LUIS.ai) to identify intents and entities.
For example, the sentence "open chrome browser" will be identified with the intent "web.open_browser" and entity "chrome" as the browser type.Human Framework then executes the action specific for the classified intent.
For example, the intent "web.open_browser" will useSeleniumto automate opening a chrome browser.Usage / InstallationCreate an Azure accountGo toAzure portaland create an account.On the Azure portal dashboard, clickCreate a resource, look forCognitive Servicesand clickCreateFill up form and clickCreatebuttonCreate a LUIS.ai accountDownload the Human Framework training data fromhttps://raw.githubusercontent.com/roniemartinez/HumanFramework/master/train/en.jsonand save it with.jsonextensionGo toLUIS.aiand create an accountClickImport new appClickChoose app file (JSON format) ...and select the downloaded Human Framework training dataOptionally, type your desired app nameClickDoneClick on the application you created.On the application dashboard, clickTrainto train your LUIS.ai appConnecting Azure account to LUIS.ai and publishingClickMANAGE>Azure Resources>Add prediction resourceFill formClickPublish, selectProductionand then click thePublishbuttonGo back toAzure Resources. If you published your application toStagingenvironment, useChange query parametersto switch between environments.Copy the endpoint assigned resource in #2NOTE: After copying the endpoint, enter it to a browser's address bar to make sure that it is accessible., Otherwise, repeat the steps or use theStarter_Keywhich will only give you 1000 API callsInstalling Human FrameworkHuman Framework is written in Python 3. Start by downloading/installing Python frompython.org.To install Human Framework, enter the following command into the terminal/cmd:Directly from Githubpipinstall-egit+git@github.com:roniemartinez/HumanFramework.git#egg=humanframeworkFrom PyPIpipinstallhumanframeworkSetting up Human FrameworkUse the copied endpoint from LUIS.ai and setup Human Framework. Paste the endpoint enclosed in double quotes.humanconfig--luis-endpoint"<endpoint>"Installing DriversHuman Framework depends onSeleniumfor testing web applications. Download your desiredwebdriverand extract them to your local working directory.Writing testsWrite a text file (test_*.txt) containing your tests and save it to local working directory where you placed the Selenium Drivers.
For example, if we have a file namedtest_web.txt:open chrome https://python.org
page title should be "Welcome to Python.org"
close browserRunning testsTo run the tests intest_web.txt, enter the following on the terminal/cmd:human--testtest_web.txtTest autodiscoveryFiles inside thetrialsfolder that starts with the texttest_are automatically executed.trials
|- test_simple.txt
|- test_simple_2.txt
|- ...With this structure, you can simply typehumanto run the test cases.The future of Human FrameworkIntegrated Editor- While testing was greatly simplified because Human Framework will just execute sentences,
using the terminal to install Python and several libraries is still more developer-centric.
To remove this technical requirement, another major goal of the Human Framework project is to release a
one-click installer which should include new features like an integrated IDE/Editor.
This will greatly increase tester's productivity.Language Support- Not all testers use the English language. Supporting most languages will benefit more testers around the world.NLU Options- While LUIS.ai is very simple to use and accurate compared to other Intent Classifiers, it is not cheap.
To support more testers, a free option likeRasa NLUcan be used as an alternative.LimitationsI only implemented a few intents and actions for the proof-of-concept stage.
To know what are the possible tests that you can do with Human Framework, check the contents oftrialsandtestsfolders.AuthorRonie Martinez