ktzy0305 / mazegame Goto Github PK
View Code? Open in Web Editor NEWThis is a simple Maze Game developed using DevOps practices and concepts.
This is a simple Maze Game developed using DevOps practices and concepts.
This feature allows the user to change the configuration of the current maze by
changing some of the walls and paths, the start and end locations. The sample
outputs show one way this can be done. You are free to design your method
for configuring the maze.
(Just don't increase the maze size)--> not sure with this yet will confirm and update
When the program is run, it should display the main menu.
When a user enters an option from 0 to 4, the program will process the option
accordingly. After the option has been processed, the program will display the
main menu again and the process is repeated until the user chooses to exit.
Main menu
This option allows the user to play the maze game. It displays the maze from
the list created, the start and end location as was done in another feature and the user
can enter one of the following characters: W,A,S,D or M for moving UP, LEFT,
DOWN, RIGHT or MAIN MENU respectively, the program will process the
option accordingly if it is a valid option.
Display invalid message if move is invalid (wrong imputation, got walls blocking moving direction), else process and update the location of "A"(MOVE IT).
Build 'MazeGame_TeamBlueMonday' has failed!
Last 50 lines of build output:
[...truncated 8.55 KB...]
test_option_3_gameplay.py::test_moving_out_side �[32mPASSED�[0m�[31m [ 79%]�[0m
test_option_3_gameplay.py::test_return_menu �[32mPASSED�[0m�[31m [ 81%]�[0m
test_option_4_configuremaze.py::test_display_configuration_menu �[32mPASSED�[0m�[31m [ 83%]�[0m
test_option_4_configuremaze.py::test_no_maze_loaded �[32mPASSED�[0m�[31m [ 85%]�[0m
test_option_4_configuremaze.py::test_create_wall �[32mPASSED�[0m�[31m [ 87%]�[0m
test_option_4_configuremaze.py::test_create_passageway �[32mPASSED�[0m�[31m [ 89%]�[0m
test_option_4_configuremaze.py::test_create_start_point �[32mPASSED�[0m�[31m [ 91%]�[0m
test_option_4_configuremaze.py::test_create_end_point �[32mPASSED�[0m�[31m [ 93%]�[0m
test_option_4_configuremaze.py::test_coordinate_input_out_of_range �[32mPASSED�[0m�[31m [ 95%]�[0m
test_option_4_configuremaze.py::test_return_to_configuration_menu �[32mPASSED�[0m�[31m [ 97%]�[0m
test_option_4_configuremaze.py::test_exit_to_main_menu_from_configuration_option �[32mPASSED�[0m�[31m [100%]�[0m
=================================== FAILURES ===================================
�[31m�[1m______________________________ test_filenameinput ______________________________�[0m
�[1m def test_filenameinput():�[0m
�[1m result = check_filename("maze.csv")�[0m
�[1m> assert result == "Filename correct"�[0m
�[1m�[31mE AssertionError: assert 'Filename incorrect' == 'Filename correct'�[0m
�[1m�[31mE - Filename incorrect�[0m
�[1m�[31mE ? --�[0m
�[1m�[31mE + Filename correct�[0m
�[1m�[31mtest_option_1_fileread.py�[0m:8: AssertionError
----------------------------- Captured stdout call -----------------------------
Error, file not found
�[31m�[1m_________________________ test_filename_case_sensitive _________________________�[0m
�[1m def test_filename_case_sensitive():�[0m
�[1m result = check_filename("MAZE.CSV")�[0m
�[1m> assert result == "Filename correct"�[0m
�[1m�[31mE AssertionError: assert 'Filename incorrect' == 'Filename correct'�[0m
�[1m�[31mE - Filename incorrect�[0m
�[1m�[31mE ? --�[0m
�[1m�[31mE + Filename correct�[0m
�[1m�[31mtest_option_1_fileread.py�[0m:16: AssertionError
----------------------------- Captured stdout call -----------------------------
Error, file not found
----------- coverage: platform linux, python 3.8.1-final-0 -----------
Coverage XML written to file coverage/coverage.xml
�[31m========================= �[31m�[1m2 failed�[0m, �[32m47 passed�[0m�[31m in 7.32s�[0m�[31m =========================�[0m
Build step 'Virtualenv Builder' marked build as failure
Stopping Docker container after build completion
Publishing Coverage report....
Auto Detect was ended: Found 0 report
No reports were found
This feature allows the user to view the stored maze from the memory (in list format), done in another feature. The code for this option should not read the maze from the data file again but instead from the stored memory
This feature allows the user to read the maze diagram from the data file
and store it in memory. It also stores the start (A) location and the end (B)
location. The application should prompt the user for the name of the data file.
The docker and shining panda in Jenkins is running on Linux, which its file system is case sensitive. The unit test "test_filename_case_sensitive test case" passed in Windows but in Shining Panda and Docker it has failed. So we have to remove the test_filename_case_sensitive test case. And that the for test_filenameinput, you need to change check_filename("maze.csv") to check_filename("Maze.csv")
When the program is run, it should display the main menu.
When a user enters an option from 0 to 4, the program will process the option
accordingly. After the option has been processed, the program will display the
main menu again and the process is repeated until the user chooses to exit.
Main menu
This feature allows the user to change the configuration of the current maze by
changing some of the walls and paths, the start and end locations. The sample
outputs show one way this can be done. You are free to design your method
for configuring the maze.
(Just don't increase the maze size)--> not sure with this yet will confirm and update
This feature allows the user to view the stored maze from the memory (in list format), done in another feature. The code for this option should not read the maze from the data file again but instead from the stored memory
I'll put the "test_QApytest_mainmenu.py" outside of QA folder because it does not run when it is inside a directory.
Build 'MazeGame_TeamBlueMonday' has failed!
Last 50 lines of build output:
[...truncated 978 B...]
Build Docker image from ./Dockerfile ...
$ /var/lib/jenkins/tools/org.jenkinsci.plugins.docker.commons.tools.DockerTool/Docker_Core/bin/docker build --file /var/lib/jenkins/workspace/MazeGame_TeamBlueMonday/Dockerfile /var/lib/jenkins/workspace/MazeGame_TeamBlueMonday
Sending build context to Docker daemon 557.1 kBSending build context to Docker daemon 1.114 MBSending build context to Docker daemon 1.671 MBSending build context to Docker daemon 2.228 MBSending build context to Docker daemon 2.785 MBSending build context to Docker daemon 3.342 MBSending build context to Docker daemon 3.899 MBSending build context to Docker daemon 4.456 MBSending build context to Docker daemon 5.014 MBSending build context to Docker daemon 5.376 MB
Step 1/7 : FROM python:3
---> 2d2ae8451803
Step 2/7 : WORKDIR /src/app
---> Using cache
---> 361e2db54895
Step 3/7 : COPY requirements.txt /src/app/requirements.txt
---> Using cache
---> 79968d3e40bb
Step 4/7 : WORKDIR /src/app
---> Using cache
---> bae2b67fbca8
Step 5/7 : RUN pip install -r requirements.txt
---> Using cache
---> 22bb12498f57
Step 6/7 : COPY . /src/app
---> 5d1639a0c31a
Step 7/7 : ENV DISPLAY=:99
---> Running in f1d769a51a67
Removing intermediate container f1d769a51a67
---> 669dcb7415e1
Successfully built 669dcb7415e1
Docker container 903d5d66f67a2299381d60402468b6f926eac32c587326dc0d2eda87838e3e3f started to host the build
[MazeGame_TeamBlueMonday] $ /var/lib/jenkins/tools/org.jenkinsci.plugins.docker.commons.tools.DockerTool/Docker_Core/bin/docker exec --tty --user 113:117 903d5d66f67a2299381d60402468b6f926eac32c587326dc0d2eda87838e3e3f env BUILD_DISPLAY_NAME=#35 BUILD_ID=35 BUILD_NUMBER=35 BUILD_TAG=jenkins-MazeGame_TeamBlueMonday-35 BUILD_URL=https://web-jenkins.southeastasia.cloudapp.azure.com/job/MazeGame_TeamBlueMonday/35/ CLASSPATH= DISPLAY=:99 EXECUTOR_NUMBER=1 GIT_BRANCH=origin/master GIT_COMMIT=356505af560f18720c1d48ff1375b94301073b77 GIT_PREVIOUS_COMMIT=66de762262ca10072e6e93ae73f12c4cd0ac7aa2 GIT_PREVIOUS_SUCCESSFUL_COMMIT=37004da5dba5a5280693434a7046541f960a5883 GIT_URL=https://github.com/ktzy0305/MazeGame.git GPG_KEY=E3FF2839C048B25C084DEBE9B26995E310250568 HOME=/root HOSTNAME=903d5d66f67a HUDSON_HOME=/var/lib/jenkins HUDSON_SERVER_COOKIE=b43d563e718e1b44 HUDSON_URL=https://web-jenkins.southeastasia.cloudapp.azure.com/ JENKINS_SERVER_COOKIE=b43d563e718e1b44 JENKINS_URL=https://web-jenkins.southeastasia.cloudapp.azure.com/ JOB_BASE_NAME=MazeGame_TeamBlueMonday JOB_DISPLAY_URL=https://web-jenkins.southeastasia.cloudapp.azure.com/job/MazeGame_TeamBlueMonday/display/redirect JOB_NAME=MazeGame_TeamBlueMonday JOB_URL=https://web-jenkins.southeastasia.cloudapp.azure.com/job/MazeGame_TeamBlueMonday/ LANG=C.UTF-8 NODE_LABELS=master NODE_NAME=master PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin PATH+CHROMEDRIVER=/var/lib/jenkins/tools/chromedriver PYTHON_GET_PIP_SHA256=da288fc002d0bb2b90f6fbabc91048c1fa18d567ad067ee713c6e331d3a32b45 PYTHON_GET_PIP_URL=https://github.com/pypa/get-pip/raw/42ad3426cb1ef05863521d7988d5f7fec0c99560/get-pip.py PYTHON_PIP_VERSION=20.0.2 PYTHON_VERSION=3.8.1 RUN_CHANGES_DISPLAY_URL=https://web-jenkins.southeastasia.cloudapp.azure.com/job/MazeGame_TeamBlueMonday/35/display/redirect?page=changes RUN_DISPLAY_URL=https://web-jenkins.southeastasia.cloudapp.azure.com/job/MazeGame_TeamBlueMonday/35/display/redirect TERM=xterm WORKSPACE=/var/lib/jenkins/workspace/MazeGame_TeamBlueMonday /bin/bash -xe /tmp/shiningpanda5739066410510961709.sh
+ pip install -r requirements.txt
�[33mWARNING: The directory '/root/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.�[0m
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: mock==3.0.5 in /usr/local/lib/python3.8/site-packages (from -r requirements.txt (line 1)) (3.0.5)
Requirement already satisfied: pytest==5.3.4 in /usr/local/lib/python3.8/site-packages (from -r requirements.txt (line 2)) (5.3.4)
Requirement already satisfied: pytest-cov==2.8.1 in /usr/local/lib/python3.8/site-packages (from -r requirements.txt (line 3)) (2.8.1)
Requirement already satisfied: six in /usr/local/lib/python3.8/site-packages (from mock==3.0.5->-r requirements.txt (line 1)) (1.14.0)
Requirement already satisfied: packaging in /usr/local/lib/python3.8/site-packages (from pytest==5.3.4->-r requirements.txt (line 2)) (20.1)
Requirement already satisfied: py>=1.5.0 in /usr/local/lib/python3.8/site-packages (from pytest==5.3.4->-r requirements.txt (line 2)) (1.8.1)
Requirement already satisfied: wcwidth in /usr/local/lib/python3.8/site-packages (from pytest==5.3.4->-r requirements.txt (line 2)) (0.1.8)
Requirement already satisfied: pluggy<1.0,>=0.12 in /usr/local/lib/python3.8/site-packages (from pytest==5.3.4->-r requirements.txt (line 2)) (0.13.1)
Requirement already satisfied: attrs>=17.4.0 in /usr/local/lib/python3.8/site-packages (from pytest==5.3.4->-r requirements.txt (line 2)) (19.3.0)
Requirement already satisfied: more-itertools>=4.0.0 in /usr/local/lib/python3.8/site-packages (from pytest==5.3.4->-r requirements.txt (line 2)) (8.2.0)
Requirement already satisfied: coverage>=4.4 in /usr/local/lib/python3.8/site-packages (from pytest-cov==2.8.1->-r requirements.txt (line 3)) (5.0.3)
Requirement already satisfied: pyparsing>=2.0.2 in /usr/local/lib/python3.8/site-packages (from packaging->pytest==5.3.4->-r requirements.txt (line 2)) (2.4.6)
�[31mERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/root/.local'
Check the permissions.
�[0m
Build step 'Virtualenv Builder' marked build as failure
Stopping Docker container after build completion
Publishing Coverage report....
Auto Detect was ended: Found 0 report
No reports were found
This option allows the user to play the maze game. It displays the maze from
the list created, the start and end location as was done in another feature and the user
can enter one of the following characters: W,A,S,D or M for moving UP, LEFT,
DOWN, RIGHT or MAIN MENU respectively, the program will process the
option accordingly if it is a valid option.
Display invalid message if move is invalid (wrong imputation, got walls blocking moving direction), else process and update the location of "A"(MOVE IT).
I've tried many ways to find the python Pytest online for automated user interface testing but didn't make it. Most of the solution does not work for me, there is some solutions but I do not really understand how to apply to my QA user interface testing.
This feature allows the user to read the maze diagram from the data file
and store it in memory. It also stores the start (A) location and the end (B)
location. The application should prompt the user for the name of the data file.
Pytest no open function therefore might cause alot of problems doing automated testing.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.