Skip to content

Feature/war 991: Implement wtag feature at framework level#74

Merged
satyakrish merged 54 commits into
developfrom
feature/WAR-991
Jan 10, 2018
Merged

Feature/war 991: Implement wtag feature at framework level#74
satyakrish merged 54 commits into
developfrom
feature/WAR-991

Conversation

@navvrnd

@navvrnd navvrnd commented Jul 14, 2017

Copy link
Copy Markdown
Contributor

Please check the design doc from the jira ticket. Please note that file option would not work here as expected, as it is implemented separately in war-1172.

navvrnd pushed a commit that referenced this pull request Jul 14, 2017
…to master

* commit '2ea70552e0043d0691f50ce901f1289b80047341':
  Updated default_config
  Updated default_config
  Excluded warriorframework tag from being processed
  Changed the default config file

@Annam16 Annam16 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Travis CI build failed. Please resolve it

@navvrnd navvrnd changed the title Feature/war 991 Feature/war 991: Implement wtag feature at framework level Jul 18, 2017
@Annam16

Annam16 commented Jul 31, 2017

Copy link
Copy Markdown

@navvrnd Please resolve merge conflicts

def get_values_from_datafile(self, system_name, strvar, langs, states,
currencys, ramspace, configfile, intvar,
file_config):
"""get the values from datafile

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@navvrnd Add description for each argument in documentation string

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done.

<Time>15:51</Time>
<State/>
<InputDataFile>../../data/data_wtag.xml</InputDataFile>
<!-- <InputDataFile>../../../warrior_fnc_tests/warrior_tests/data/framework_tests/data_wtag.xml</InputDataFile> -->

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

please remove this commented line since it contains our local repository name.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done.

"""
vartype = type(var)
if vartype is not datatype:
print_error('is not a {}, but {}'.format(datatype, vartype))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Can you please add the error message more clear?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done.

@Annam16 Annam16 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Please refer the comments added.

@satyakrish satyakrish left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

the resolution provided to intial comments was not sufficient, updated more details on the questions.. please address them.

else:
return value
else:
return None

@satyakrish satyakrish Dec 5, 2017

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@navvrnd
for #1 i know it is the place where you are converting wtag var to actual value ... i had asked the logic behind the if/else statements you had used .. why have you used in a specific flow? Nevertheless I can see that in your if/else logic if system name is not the first argument of the keyword wtag substitution will fail.. please fix it.

for #2: I still dont understand your explanation.. please explain here with a small example on what line 196 is doing both if and else part

for #3: your suggestion is not an advisable practice but it works, i'm ok with it but I would advice to move it to the constructor with default values (you can default it to None and in the function check if it none and if so call get credentials to get tag_dict in your function and re assign it to None when you are done with it)

#4 ok with your implementation

@satyakrish satyakrish left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Updates from call on 12/20:

#1: Arvind to handle the case when system name is not the first argument. wtag should work even if system name is not the first argument.

#2: Lets stick with existing behaviors , please remove the additional checks introduced as part of wtag.

existing behavior:

  • if an argument is mandatory and no value provided in testcase step then the keyword should fail.

  • if an argument is optional and no value provided in test case step then the default value in keyword signature should be used.

@navvrnd

navvrnd commented Dec 22, 2017

Copy link
Copy Markdown
Contributor Author

@satyakrish made the changes as per your comments. Please review and approve. Logs attached in the ticket.

@satyakrish

Copy link
Copy Markdown
Contributor

@navvrnd
cc: @bjrr

The changes look good, but while reviewing it this time I observed another issue. With the currently implementation do we assume that a keyword would always have mandatory arguments? If so we should make changes to implement the case where the keyword has all optional arguments as well. Because there is no check to stop a developing a keyword which has all optional arguments including the system name. Can you verify this case and make changes accordingly.
Also please update the test cases to include such a scenario.

@navvrnd

navvrnd commented Jan 8, 2018

Copy link
Copy Markdown
Contributor Author

@satyakrish cc: @bjrr Made the requested changes. Please check and approve.

@satyakrish

Copy link
Copy Markdown
Contributor

@navvrnd : the changes you made are not sufficient? The purpose of the change was to make sure that if a keyword has all optional arguments , wtag substitution should work fine? but you have not covered it at all...

You have updated your keyword to have all optional arguments.
1- but wtag substitution is not taking place anywhere. Please make sure to use wtag in this case and make sure it works fine as well... you should use wtag substitutions as default values of an argument and also as a value provided by user in the test case.

2- you should also test the case where

  • all arguements are optional (lets say there are 5 arguements)
  • system name should be the third argument (in both keyword signature and the arguements provided in the testcase)
  • make sure at least one argument preceding system name has wtag substitution (lets say the first argument) and also one argument after system_name should have wtag substitution (lets say 5 argument) and both cases should work fine.

@navvrnd

navvrnd commented Jan 10, 2018

Copy link
Copy Markdown
Contributor Author

@satyakrish Made the required changes and updated the ticket with the cli full regression, wtag and kw prefix logs. Please check and approve.

@bjrr
bjrr requested a review from satyakrish January 10, 2018 17:46
@kaheichan
kaheichan requested review from kaheichan and removed request for kaheichan January 10, 2018 20:17
@satyakrish
satyakrish dismissed stale reviews from kaheichan and bjrr January 10, 2018 20:18

stale

@satyakrish
satyakrish merged commit 76d8be1 into develop Jan 10, 2018
@bjrr bjrr added this to the Warrior-3.7.0 milestone Jan 12, 2018
kaheichan added a commit that referenced this pull request Jan 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants