Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UPDATE master from devel #26

Merged
merged 22 commits into from
Sep 3, 2017
Merged

UPDATE master from devel #26

merged 22 commits into from
Sep 3, 2017

Conversation

netzulo
Copy link
Owner

@netzulo netzulo commented Aug 30, 2017

TODO

  • open browser LOCAL: chrome
  • open browser LOCAL: firefox
  • open browser LOCAL: internet explorer
  • open browser LOCAL: edge
  • open browser LOCAL: phantomjs
  • open browser REMOTE: chrome
  • open browser REMOTE: firefox
  • open browser REMOTE: internet explorer
  • open browser REMOTE: edge
  • open browser REMOTE: phantomjs
  • testcase to open browser LOCAL: chrome
  • testcase to open browser LOCAL: firefox
  • testcase to open browser LOCAL: internet explorer
  • testcase to open browser LOCAL: edge
  • testcase to open browser LOCAL: phantomjs
  • testcase to open browser REMOTE: chrome
  • testcase to open browser REMOTE: firefox
  • testcase to open browser REMOTE: internet explorer
  • testcase to open browser REMOTE: edge
  • testcase to open browser REMOTE: phantomjs
  • include tests on README.md file
  • Update module, qadoc with new documentation

Minimal Tests (section for reviewers only)

    • Starting browser local chrome
    • Starting browser local firefox
    • Starting browser local iexplorer (internet explorer)
    • Starting browser local edge (just windows 10)
    • Starting browser local phantomjs
    • Starting browser remote chrome
    • Starting browser remote firefox
    • Starting browser remote iexplorer (internet explorer)
    • Starting browser remote edge (just windows 10)
    • Starting browser remote phantomjs
    • Fix for CoreException arguments constructor (change settings mode key with invalid value)
    • Checking driver_name with config driver name list (change settings browser key with invalid key)

help to start browser ?

Starting on root path proyect

  1. Follow this guide: https://github.com/netzulo/qalab#how-to-install-
    1.1. Clone this repo : git clone https://github.com/netzulo/qalab.git
    1.2. Enter on repo directory : cd qalab
    1.3. Clone submodules : git submodule update --init --recursive
    1.4. Attach branches HEAD: git submodule foreach git checkout master
  2. go to qacode module: cd modules/qacode
  3. Exec: nosetests tests\functionals\TestBotBase.py --tc-file="qacode/configs/settings.example.ini"

Issues related

@netzulo netzulo added the Feature New functionality proposal label Aug 30, 2017
@netzulo netzulo requested a review from Terseus August 30, 2017 01:22
@netzulo
Copy link
Owner Author

netzulo commented Aug 30, 2017

make it PUM please @Terseus

@netzulo
Copy link
Owner Author

netzulo commented Sep 2, 2017

starting REMOTE drivers development

@netzulo
Copy link
Owner Author

netzulo commented Sep 3, 2017

let pending update documentation, was referenced on qadoc update qacode doc v0.0.9

@netzulo
Copy link
Owner Author

netzulo commented Sep 3, 2017

Finally v0.1.0

@netzulo netzulo merged commit fb47297 into master Sep 3, 2017
self.log.error("Error core: cause=%s , message=%s", cause, message)
log = None

def __init__(self, cause, message, log=None):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're not calling super to call the parent class __init__ method.

Also, why do you need to store the log in the exception instance?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:octocat: to duplicate log messages, ty xD


if browser_file is None:
raise CoreException(message="Failed at select driver name",
cause="selected isn't valid : {}".format(browser_file),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you're putting the real cause of the error in the cause param and an unhelpful message in the message param.

Why not to put the cause value in message and get rid of the cause param here?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true, useless param, deleting at next version

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#36

self.curr_driver_path = "{}/{}".format(self.bot_config.bot_drivers_path,"{}")
"""
self.curr_driver_path = "{}/{}".format(self.bot_config.bot_drivers_path,"{}")
is_64bits = sys.maxsize > 2**32
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this must be a module/package constant as its value will never change at runtime.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true , must be constant var

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue at : #37

@@ -7,11 +7,105 @@

class TestBotBase(TestInfoBase):

def __init__(self, method_name="TestTestInfoBase"):
def __init__(self, method_name="TestBotBase"):
super(TestBotBase, self).__init__(method_name, logger_manager=None)

def test_001_bot_local_chrome(self):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the tests numbered, when you want to add a test case in the middle, will:
a) force you to renumber unmodified tests, which is a needless pain, or
b) make a mess of numbers in the long term.

Having just meaningful test names is enough, I think.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true, but my problem was i need to execute tests in defined order, must be solve on another way

bot_config.bot_browser = "chrome"
bot_config.bot_mode = "local"
self.bot = BotBase(bot_config)
time.sleep(10)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can be possible to implement some kind of wait method in BotBase that only returns after the bot is running?

With it, you would call self.bot.wait() instead of all these time.sleeps and gives more guarantees about the state of the bot; what happens if the bot takes more than 10 seconds to be ready?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true, need to implement implicit_waits from selenium and make tests for it :)

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#32 must be include implicit wait strategy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New functionality proposal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants