This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Behave runner for running features asynchronously. | |
| """ | |
| from multiprocessing import Pool | |
| from subprocess import call, Popen, PIPE | |
| from glob import glob | |
| import logging | |
| import argparse | |
| import json | |
| from functools import partial |
http://angular.github.io/protractor/#/api
Note: Most commands return promises, so you only resolve their values through using jasmine expect API or using .then(function()) structure
Based on this post: https://spagettikoodi.wordpress.com/2015/01/14/angular-testing-cheat-sheet/ by @crystoll
browser.get('yoururl'); // Load address, can also use '#yourpage'Protractor is the end to end test case runner for AngularJS. These end to end test cases can be repurposed to record performance metrics when the scenario is being run. This is a sample repository with an example of how this can be done.
Install all dependencies using npm install
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # Working with branches | |
| # | |
| # Get the current branch name (not so useful in itself, but used in | |
| # other aliases) | |
| branch-name = "!git rev-parse --abbrev-ref HEAD" | |
| # Push the current branch to the remote "origin", and set it to track | |
| # the upstream branch | |
| publish = "!git push -u origin $(git branch-name)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def SetBrowserObj(self): | |
| try: | |
| if self.browserdriver.strip().upper() == "CHROME": | |
| options = webdriver.chrome.options.Options() | |
| options.add_argument("-incognito") | |
| browser = webdriver.Chrome(chrome_options=options) | |
| if self.browserdriver.strip().upper() == "FIREFOX": | |
| browser = webdriver.Firefox() | |
| self.driver = browser |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| in upload handler | |
| in file close | |
| .. | |
| ---------------------------------------------------------------------- | |
| Ran 2 tests in 0.021s | |
| OK |