Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more and better tests and test cases #104

Open
mithi opened this issue Jun 17, 2020 · 15 comments
Open

Add more and better tests and test cases #104

mithi opened this issue Jun 17, 2020 · 15 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@mithi
Copy link
Owner

mithi commented Jun 17, 2020

Sample code

Please checkout how the sample test cases in:

References

Get started with testing python

Write Professional Unit Tests in Python

Web Automation Tests with Selenium

@mithi mithi added help wanted Extra attention is needed good first issue Good for newcomers first-timers-only Good for new comers labels Jun 17, 2020
@mithi mithi pinned this issue Jun 17, 2020
@Veluxer
Copy link

Veluxer commented Jun 23, 2020

Hello =) i would be interested by helping as i know a bit of python and i used selenium for a personal project, did you code this under windows or linux? and would you mind telling me if there are specific step to take to help (or clone the repository)?
i thought your project would be interesting but i never contributed before >.< so i'm sorry if my question seem dumb ^^

@mithi
Copy link
Owner Author

mithi commented Jun 23, 2020

@Veluxer !

Thank you for your interest in contributing to this project!

I tested this code on macOS, but it is currently deployed on Heroku which uses lightweight Linux containers
see also:

To get started, you can do the following:

1. Clone this repo

git clone https://github.com/mithi/hexapod-robot-simulator.git

2. Inside the repo, install the requirements

pip3 install -r requirements.txt

If you have trouble you can checkout stackoverflow
https://stackoverflow.com/questions/41457612/how-to-use-requirements-txt-to-install-all-dependencies-in-a-python-project?rq=1

The other requirements are mostly for deployment, the only things you really need to install are the following:

Python 3.8.1
Plotly Dash 1.10.0
Plotly Dash Daq 0.4.0
Numpy 1.18.1

Which can easily be installed with

pip3 install dash==1.13.3
pip3 install dash_daq
pip3 install numpy

3. Check if it runs

python index.py

You should be able to see it running on your browser at Running on http://127.0.0.1:8050/

Help creating tests

As of the moment, this project has poor test coverage (as you can see it's only about 62% this means that a lot of blocks of codes are not executed when our current tests are run.

What kinds of tests to create is up to you but I suggest the best ones are the most basic ones, like making sure the page renders properly, and that the links, sliders and text boxes are working and stuff like that.

It would also be nice if more test cases are added

example test cases

You can also make test cases for the following inverse kinematics cases if you like:

Inverse Kinematics Edge Cases

  • Coxia point shoved on ground
  • Body contact shoved on ground
  • Can't reach target ground point
    • Femur length is too long
    • Tibia length is too long
    • The ground is blocking the path
  • Legs too short
    • Too many legs off the floor
    • All left legs off the ground
    • All right legs off the ground
  • Angle required is beyond range of motion
    • Alpha
    • Beta
    • Gamma

VirtualHexapod.Update Edge Cases

  • Unstable. Center of gravity is outside the hexapod's support polygon

Let me know if you have any more questions! Please don't hesitate to ask anything! Thanks again!

@Veluxer
Copy link

Veluxer commented Jun 24, 2020

Thanks a lot!!!
That was quite clear =)
i will try and reach out if i have any question!

@mithi
Copy link
Owner Author

mithi commented Jun 24, 2020

Thanks a lot!!!
That was quite clear =)
i will try and reach out if i have any question!

Enjoy! ❤️

@GobindB
Copy link

GobindB commented Jul 20, 2020

Hey there, I'm looking for first issues to get involved with as I foray into the world of open-source :) I wanted to see if there was still scope to get involved with solving this issue? Thank you for taking the time!

@mithi
Copy link
Owner Author

mithi commented Jul 20, 2020

Hey there, I'm looking for first issues to get involved with as I foray into the world of open-source :) I wanted to see if there was still scope to get involved with solving this issue? Thank you for taking the time!

Yes! :)

Please read: #104 (comment)

and you can check out the alerts that could be triggered in this file
https://github.com/mithi/hexapod-robot-simulator/blob/master/hexapod/ik_solver/helpers.py

Please let me know if you have any questions. Thanks!

@RonakSharma1
Copy link

Hi!
I am currently looking for opportunities to contribute to Github and saw that this project is a first-timer issue. Therefore, I wanted to know if this issue is still open to contribute. Thanks

@mithi
Copy link
Owner Author

mithi commented Aug 13, 2020

Hi!
I am currently looking for opportunities to contribute to Github and saw that this project is a first-timer issue. Therefore, I wanted to know if this issue is still open to contribute. Thanks

Yes, this is still open! Feel free to ask me anything if there is anything you need clarified! Thanks!

@myiwt
Copy link

myiwt commented Sep 3, 2020

Hi there, would you still like some more help on this?

@mithi
Copy link
Owner Author

mithi commented Sep 3, 2020

Hi there, would you still like some more help on this?

Yes, this is still open! Feel free to ask me anything if there is anything you need clarified! Thanks!

@mithi
Copy link
Owner Author

mithi commented Sep 4, 2020 via email

@sgetty
Copy link

sgetty commented Dec 4, 2020

Hi, I am looking for a good opportunity to contribute to a GitHub Repository. Is this issue still open for contributions? Thanks.

@mithi
Copy link
Owner Author

mithi commented Dec 5, 2020

Hi, I am looking for a good opportunity to contribute to a GitHub Repository. Is this issue still open for contributions? Thanks.

Yup! Still open!

Please checkout the Contribution Guide and commit style guide

Have fun!

@pratheekcr
Copy link

HI @mithi is this ticket still open? I would love to contribute, please let me know.

@mithi
Copy link
Owner Author

mithi commented Jan 10, 2021

HI @mithi is this ticket still open? I would love to contribute, please let me know.

Hi @pratheekcr,

More and better test cases are always welcome!

Don't forget to checkout the Contribution Guide and commit style guide

Have fun!

@mithi mithi removed the first-timers-only Good for new comers label Mar 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

7 participants