You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2021/01/27 23:18:54 UTC
[GitHub] [trafficcontrol] dpham692 opened a new pull request #5473: Migrate internal TP test suite to open source
dpham692 opened a new pull request #5473:
URL: https://github.com/apache/trafficcontrol/pull/5473
<!--
************ STOP!! ************
If this Pull Request is intended to fix a security vulnerability, DO NOT submit it! Instead, contact
the Apache Software Foundation Security Team at security@trafficcontrol.apache.org and follow the
guidelines at https://www.apache.org/security/ regarding vulnerability disclosure.
-->
## What does this PR (Pull Request) do?
<!-- Explain the changes you made here. If this fixes an Issue, identify it by
replacing the text in the checkbox item with the Issue number e.g.
^ This will automatically close Issue number 9001 when the Pull Request is
merged (The '#' is important).
Be sure you check the box properly, see the "The following criteria are ALL
met by this PR" section for details.
-->
- [x] This PR add internal TP test suite to open source
## Which Traffic Control components are affected by this PR?
<!-- Please delete all components from this list that are NOT affected by this
Pull Request. Also, feel free to add the name of a tool or script that is
affected but not on the list.
Additionally, if this Pull Request does NOT affect documentation, please
explain why documentation is not required. -->
- Traffic Portal
## What is the best way to verify this PR?
<!-- Please include here ALL the steps necessary to test your Pull Request. If
it includes tests (and most should), outline here the steps needed to run the
tests. If not, lay out the manual testing procedure and please explain why
tests are unnecessary for this Pull Request. -->
1. Go to test/integration/trafficportal and run the tests. Read the readme files in trafficportal to know how to run it.
## The following criteria are ALL met by this PR
<!-- Check the boxes to signify that the associated statement is true. To
"check a box", replace the space inside of the square brackets with an 'x'.
e.g.
- [ x] <- Wrong
- [x ] <- Wrong
- [] <- Wrong
- [*] <- Wrong
- [x] <- Correct!
-->
- [x] This PR includes tests OR I have explained why tests are unnecessary
- [x] This PR **DOES NOT FIX A SERIOUS SECURITY VULNERABILITY** (see [the Apache Software Foundation's security guidelines](https://www.apache.org/security/) for details)
## Additional Information
<!-- If you would like to include any additional information on the PR for
potential reviewers please put it here.
Some examples of this would be:
- Before and after screenshots/gifs of the Traffic Portal if it is affected
- Links to other dependent Pull Requests
- References to relevant context (e.g. new/updates to dependent libraries,
mailing list records, blueprints)
Feel free to leave this section blank (or, preferably, delete it entirely).
-->
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficcontrol] mitchell852 commented on a change in pull request #5473: Migrate internal TP test suite to open source
Posted by GitBox <gi...@apache.org>.
mitchell852 commented on a change in pull request #5473:
URL: https://github.com/apache/trafficcontrol/pull/5473#discussion_r568195950
##########
File path: traffic_portal/test/integration/Readme.md
##########
@@ -0,0 +1,20 @@
+# Traffic Portal Test Automation
+
+### Test Development Environment Setup
+---
+* Install [Node](http://nodejs.org) (v6.x.x or later) `brew install node`
+* Follow setup steps described [here](http://www.protractortest.org/#/tutorial#setup)
+* Now install packages manager: `npm install`
+* Now install protractor `npm i protractor`
+* Now install typescript `npm install typescript@3.6.4 -g`
+* Now install selenium standalone- `sudo webdriver-manager update`
+* In a separate command line window, run `sudo webdriver-manager start` and keep it running.
+* Run CDN-in-a-Box and make sure all the components and features display.
+
+### Run Tests
+---
+run `tsc` from integration directory. This command will compile and convert the typescript files into javascript files. The generated js files are available in integration/GeneratedCode directory
+run `protractor ./GeneratedCode/config.js --params.baseUrl='https://localhost:443'` from integration directory. This command will run the protractor test from the environment user input.
+
+### Test Automation Framework
Review comment:
@dpham692 - can you delete this section of the readme as well as delete trafficportal/tp-framework.png
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficcontrol] mitchell852 edited a comment on pull request #5473: Migrate internal TP test suite to open source
Posted by GitBox <gi...@apache.org>.
mitchell852 edited a comment on pull request #5473:
URL: https://github.com/apache/trafficcontrol/pull/5473#issuecomment-771210941
ok, so now we need to get our open source license checker to be happy. you will need this on the top of all your code files. i.e. your ts files and bash files.
```
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
```
here are some examples:
https://github.com/apache/trafficcontrol/blob/master/infrastructure/cdn-in-a-box/traffic_ops/to-access.sh
https://github.com/apache/trafficcontrol/blob/master/traffic_portal/test/end_to_end/CDNs/cdns-spec.js
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficcontrol] mitchell852 edited a comment on pull request #5473: Migrate internal TP test suite to open source
Posted by GitBox <gi...@apache.org>.
mitchell852 edited a comment on pull request #5473:
URL: https://github.com/apache/trafficcontrol/pull/5473#issuecomment-771210941
ok, so now we need to get our open source license checker (weasel) to be happy. you will need this on the top of all your code files. i.e. your ts files and bash files.
```
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
```
here are some examples:
https://github.com/apache/trafficcontrol/blob/master/infrastructure/cdn-in-a-box/traffic_ops/to-access.sh
https://github.com/apache/trafficcontrol/blob/master/traffic_portal/test/end_to_end/CDNs/cdns-spec.js
More specifically, it looks like these files need the license disclaimer:
```
Error Unknown! traffic_portal/test/integration/.gitignore
Error Unknown! traffic_portal/test/integration/CommonUtils/API.ts
Error Unknown! traffic_portal/test/integration/Dockerfile
Error Unknown! traffic_portal/test/integration/PageObjects/ASNs.po.ts
Error Unknown! traffic_portal/test/integration/PageObjects/BasePage.po.ts
Error Unknown! traffic_portal/test/integration/PageObjects/CDNPage.po.ts
Error Unknown! traffic_portal/test/integration/PageObjects/CacheGroup.po.ts
Error Unknown! traffic_portal/test/integration/PageObjects/CoordinatesPage.po.ts
Error Unknown! traffic_portal/test/integration/PageObjects/Divisions.po.ts
Error Unknown! traffic_portal/test/integration/PageObjects/LoginPage.po.ts
Error Unknown! traffic_portal/test/integration/PageObjects/OriginsPage.po.ts
Error Unknown! traffic_portal/test/integration/PageObjects/ParametersPage.po.ts
Error Unknown! traffic_portal/test/integration/PageObjects/PhysLocationsPage.po.ts
Error Unknown! traffic_portal/test/integration/PageObjects/ProfilesPage.po.ts
Error Unknown! traffic_portal/test/integration/PageObjects/RegionsPage.po.ts
Error Unknown! traffic_portal/test/integration/PageObjects/ServerCapabilitiesPage.po.ts
Error Unknown! traffic_portal/test/integration/PageObjects/ServersPage.po.ts
Error Unknown! traffic_portal/test/integration/PageObjects/ServiceCategories.po.ts
Error Unknown! traffic_portal/test/integration/PageObjects/SideNavigationPage.po.ts
Error Unknown! traffic_portal/test/integration/PageObjects/Statuses.po.ts
Error Unknown! traffic_portal/test/integration/PageObjects/TenantsPage.po.ts
Error Unknown! traffic_portal/test/integration/PageObjects/TopNavigationPage.po.ts
Error Unknown! traffic_portal/test/integration/PageObjects/Types.po.ts
Error Unknown! traffic_portal/test/integration/PageObjects/UsersPage.po.ts
Error Unknown! traffic_portal/test/integration/config.ts
Error Unknown! traffic_portal/test/integration/runtests.bash
Error Unknown! traffic_portal/test/integration/specs/ASNs.spec.ts
Error Unknown! traffic_portal/test/integration/specs/CDNs.spec.ts
Error Unknown! traffic_portal/test/integration/specs/CacheGroup.spec.ts
Error Unknown! traffic_portal/test/integration/specs/Coordinates.spec.ts
Error Unknown! traffic_portal/test/integration/specs/Divisions.spec.ts
Error Unknown! traffic_portal/test/integration/specs/Origins.spec.ts
Error Unknown! traffic_portal/test/integration/specs/Parameters.spec.ts
Error Unknown! traffic_portal/test/integration/specs/PhysLocations.spec.ts
Error Unknown! traffic_portal/test/integration/specs/Profiles.spec.ts
Error Unknown! traffic_portal/test/integration/specs/Regions.spec.ts
Error Unknown! traffic_portal/test/integration/specs/ServerCapabilities.spec.ts
Error Unknown! traffic_portal/test/integration/specs/ServerServerCapabilities.spec.ts
Error Unknown! traffic_portal/test/integration/specs/Servers.spec.ts
Error Unknown! traffic_portal/test/integration/specs/ServiceCategories.spec.ts
Error Unknown! traffic_portal/test/integration/specs/Statuses.spec.ts
Error Unknown! traffic_portal/test/integration/specs/Types.spec.ts
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficcontrol] mitchell852 commented on a change in pull request #5473: Migrate internal TP test suite to open source
Posted by GitBox <gi...@apache.org>.
mitchell852 commented on a change in pull request #5473:
URL: https://github.com/apache/trafficcontrol/pull/5473#discussion_r568195950
##########
File path: traffic_portal/test/integration/Readme.md
##########
@@ -0,0 +1,20 @@
+# Traffic Portal Test Automation
+
+### Test Development Environment Setup
+---
+* Install [Node](http://nodejs.org) (v6.x.x or later) `brew install node`
+* Follow setup steps described [here](http://www.protractortest.org/#/tutorial#setup)
+* Now install packages manager: `npm install`
+* Now install protractor `npm i protractor`
+* Now install typescript `npm install typescript@3.6.4 -g`
+* Now install selenium standalone- `sudo webdriver-manager update`
+* In a separate command line window, run `sudo webdriver-manager start` and keep it running.
+* Run CDN-in-a-Box and make sure all the components and features display.
+
+### Run Tests
+---
+run `tsc` from integration directory. This command will compile and convert the typescript files into javascript files. The generated js files are available in integration/GeneratedCode directory
+run `protractor ./GeneratedCode/config.js --params.baseUrl='https://localhost:443'` from integration directory. This command will run the protractor test from the environment user input.
+
+### Test Automation Framework
Review comment:
@dpham692 - can you delete this section (Test Automation Framework) of the readme as well as delete trafficportal/tp-framework.png
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficcontrol] mitchell852 edited a comment on pull request #5473: Migrate internal TP test suite to open source
Posted by GitBox <gi...@apache.org>.
mitchell852 edited a comment on pull request #5473:
URL: https://github.com/apache/trafficcontrol/pull/5473#issuecomment-771210941
ok, so now we need to get our open source license checker to be happy. you will need this on the top of all your code files. i.e. your ts files
```
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficcontrol] mitchell852 edited a comment on pull request #5473: Migrate internal TP test suite to open source
Posted by GitBox <gi...@apache.org>.
mitchell852 edited a comment on pull request #5473:
URL: https://github.com/apache/trafficcontrol/pull/5473#issuecomment-771210941
ok, so now we need to get our open source license checker (weasel) to be happy. you will need this on the top of all your code files. i.e. your ts files and bash files.
```
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
```
here are some examples:
https://github.com/apache/trafficcontrol/blob/master/infrastructure/cdn-in-a-box/traffic_ops/to-access.sh
https://github.com/apache/trafficcontrol/blob/master/traffic_portal/test/end_to_end/CDNs/cdns-spec.js
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficcontrol] mitchell852 commented on pull request #5473: Migrate internal TP test suite to open source
Posted by GitBox <gi...@apache.org>.
mitchell852 commented on pull request #5473:
URL: https://github.com/apache/trafficcontrol/pull/5473#issuecomment-771210941
ok, so now we need to get our open source license checker to be happy. you will need this on the top of all your code files
```
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficcontrol] mitchell852 merged pull request #5473: Migrate internal TP test suite to open source
Posted by GitBox <gi...@apache.org>.
mitchell852 merged pull request #5473:
URL: https://github.com/apache/trafficcontrol/pull/5473
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficcontrol] mitchell852 edited a comment on pull request #5473: Migrate internal TP test suite to open source
Posted by GitBox <gi...@apache.org>.
mitchell852 edited a comment on pull request #5473:
URL: https://github.com/apache/trafficcontrol/pull/5473#issuecomment-771210941
ok, so now we need to get our open source license checker to be happy. you will need this on the top of all your code files. i.e. your ts files and bash files.
```
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficcontrol] mitchell852 commented on pull request #5473: Migrate internal TP test suite to open source
Posted by GitBox <gi...@apache.org>.
mitchell852 commented on pull request #5473:
URL: https://github.com/apache/trafficcontrol/pull/5473#issuecomment-771191872
@dpham692 - currently you have these tests at `traffic_portal/test/integration/trafficportal`, can you move them to `traffic_portal/test/integration`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org