cypht icon indicating copy to clipboard operation
cypht copied to clipboard

Fix selenium tests broken after bootstrap upgrade

Open Shadow243 opened this issue 9 months ago • 8 comments

Update Selenium Tests to selenium: 4.14.0

This pull request updates the deprecated Selenium tests to use selenium: 4.14.0. As mentioned in the related issue #989, some tests have been commented out temporarily as they are not currently functional, and work is ongoing to address them.

Additionally, the servers.py file will require refactoring to accommodate recent changes, the tests will be updated accordingly to reflect these changes.

Shadow243 avatar May 02 '24 17:05 Shadow243

Trying to download unavailable version, the latest version here https://googlechromelabs.github.io/chrome-for-testing/#stable is: 124.0.6367.91 but we are trying to download 24.0.6367.118 line https://github.com/cypht-org/cypht/blob/master/.github/tests/selenium/webdriver/webdriver.sh#L3

https://storage.googleapis.com/chrome-for-testing-public/124.0.6367.118/linux64/chromedriver-linux64.zip
Resolving storage.googleapis.com (storage.googleapis.com)... 142.251.163.207, 142.251.167.207, 172.253.115.207, ...
Connecting to storage.googleapis.com (storage.googleapis.com)|142.251.163.207|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2024-05-02 17:54:24 ERROR 404: Not Found.

  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
Archive:  /tmp/chromedriver-linux64.zip
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of /tmp/chromedriver-linux64.zip or
        /tmp/chromedriver-linux64.zip.zip, and cannot find /tmp/chromedriver-linux64.zip.ZIP, period.
mv: cannot stat '/tmp/chromedriver-linux64/chromedriver': No such file or directory

Shadow243 avatar May 02 '24 18:05 Shadow243

Trying to download unavailable version, the latest version here https://googlechromelabs.github.io/chrome-for-testing/#stable is: 124.0.6367.91 but we are trying to download 24.0.6367.118 line https://github.com/cypht-org/cypht/blob/master/.github/tests/selenium/webdriver/webdriver.sh#L3

https://storage.googleapis.com/chrome-for-testing-public/124.0.6367.118/linux64/chromedriver-linux64.zip
Resolving storage.googleapis.com (storage.googleapis.com)... 142.251.163.207, 142.251.167.207, 172.253.115.207, ...
Connecting to storage.googleapis.com (storage.googleapis.com)|142.251.163.207|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2024-05-02 17:54:24 ERROR 404: Not Found.

  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
Archive:  /tmp/chromedriver-linux64.zip
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of /tmp/chromedriver-linux64.zip or
        /tmp/chromedriver-linux64.zip.zip, and cannot find /tmp/chromedriver-linux64.zip.ZIP, period.
mv: cannot stat '/tmp/chromedriver-linux64/chromedriver': No such file or directory

This seems like a temporary repository problem. Can dpkg return more than one available version of a package, so we can try with an older one?

kroky avatar May 07 '24 10:05 kroky

Trying to download unavailable version, the latest version here https://googlechromelabs.github.io/chrome-for-testing/#stable is: 124.0.6367.91 but we are trying to download 24.0.6367.118 line https://github.com/cypht-org/cypht/blob/master/.github/tests/selenium/webdriver/webdriver.sh#L3

https://storage.googleapis.com/chrome-for-testing-public/124.0.6367.118/linux64/chromedriver-linux64.zip
Resolving storage.googleapis.com (storage.googleapis.com)... 142.251.163.207, 142.251.167.207, 172.253.115.207, ...
Connecting to storage.googleapis.com (storage.googleapis.com)|142.251.163.207|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2024-05-02 17:54:24 ERROR 404: Not Found.

  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
Archive:  /tmp/chromedriver-linux64.zip
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of /tmp/chromedriver-linux64.zip or
        /tmp/chromedriver-linux64.zip.zip, and cannot find /tmp/chromedriver-linux64.zip.ZIP, period.
mv: cannot stat '/tmp/chromedriver-linux64/chromedriver': No such file or directory

This seems like a temporary repository problem. Can dpkg return more than one available version of a package, so we can try with an older one?

@kroky All versions are available except for Linux: Screenshot 2024-05-07 at 14 14 27

Shadow243 avatar May 07 '24 11:05 Shadow243

It seems that there is an error in the operation of nginx. You try to build nginx locally and see if it works properly.

wangxiaoerYah avatar May 08 '24 05:05 wangxiaoerYah

OK, looks like you really nailed this workflow, feel free to call me if you need anything.

wangxiaoerYah avatar May 08 '24 05:05 wangxiaoerYah

OK, looks like you really nailed this workflow, feel free to call me if you need anything.

Indeed but I have a problem with the Nginx setup. this blocks the rest of the tests because I need this nginx server

Shadow243 avatar May 08 '24 08:05 Shadow243

OK, looks like you really nailed this workflow, feel free to call me if you need anything.

Indeed but I have a problem with the Nginx setup. this blocks the rest of the tests because I need this nginx server

@wangxiaoerYah i'm getting 404 here:

echo "Checking if Nginx is running..."
RESPONSE_CODE=$(curl -s -o /dev/null -w '%{http_code}' 'http://cypht-test.org')
echo "Response code: $RESPONSE_CODE"
if [ "$RESPONSE_CODE" -eq 200 ]; then
    STATUS_DONE
else
    STATUS_ERROR
    exit 1
fi

with $RESPONSE_CODE

REF: Test

Shadow243 avatar May 08 '24 10:05 Shadow243

i'm getting 404 here:

I started testing later.

wangxiaoerYah avatar May 08 '24 18:05 wangxiaoerYah

@kroky @marclaporte We managed to restore some selenium tests, I had a suggestion to review and merge this PR then we will create a task which will consist of continuing the resolution of the other tasks (settings.py, inline_msg.py, keyboard_shortcuts.py) which are already working locally but strangely not on github.

Shadow243 avatar Jul 18 '24 00:07 Shadow243

Sounds good.

kroky avatar Jul 22 '24 08:07 kroky