-
Notifications
You must be signed in to change notification settings - Fork 1
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
Conversation
make it PUM please @Terseus |
+ Selenium driver used on qalab it's v3.5.3
starting REMOTE drivers development |
let pending update documentation, was referenced on qadoc update qacode doc v0.0.9 |
Finally v0.1.0 |
self.log.error("Error core: cause=%s , message=%s", cause, message) | ||
log = None | ||
|
||
def __init__(self, cause, message, log=None): |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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), |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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): |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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.sleep
s and gives more guarantees about the state of the bot; what happens if the bot takes more than 10 seconds to be ready?
There was a problem hiding this comment.
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 :)
There was a problem hiding this comment.
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
TODO
Minimal Tests (section for reviewers only)
help to start browser ?
Starting on root path proyect
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
cd modules/qacode
nosetests tests\functionals\TestBotBase.py --tc-file="qacode/configs/settings.example.ini"
Issues related