-
Notifications
You must be signed in to change notification settings - Fork 13
JavaScript sample testing process automation #9
base: master
Are you sure you want to change the base?
JavaScript sample testing process automation #9
Conversation
src/start.py
Outdated
| headers = { | ||
| "Content-Type": "application/json" | ||
| } | ||
| task_id = do_request('https://10.239.44.83:8080/rest/v1/tasks', method="PUT", data=json.dumps(TASK), |
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.
this address is hard coded?
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.
done
src/start.py
Outdated
| '--server', help='IATF server address.', required=True) | ||
| required_arguments.add_argument('--task', help='Task ID.', default=None) | ||
| opts = parser.parse_args() | ||
|
|
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.
remove unnecessary empty line
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.
done
|
1: got task id automatically |
jianjunz
left a comment
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.
I don't think we need a start.py to run the entire testing process. User's requirement may vary from one scenario to another. We'd better decouple IATF's component and provide the possibility to satisfy as much requirements as possible.
| def do_request(url, method='GET', data=None, headers=None): | ||
| response = None | ||
| if method == 'GET': | ||
| response = requests.get(url, verify=False) |
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.
Setting verify=False here is a vulnerability.
|
|
||
|
|
||
| def start(id, server, verify): | ||
| cmd = ['python3.7', os.path.abspath(os.path.join(THIS_PATH, 'controller/controller.py')), '--server', server, |
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.
Run python from a python script doesn't make sense.
|
What we needed is get task id automatically which can be integrated to automation process conveniently. And it isn't make sense to set start.py here |
No description provided.