hackIDE icon indicating copy to clipboard operation
hackIDE copied to clipboard

Add unit tests

Open sahildua2305 opened this issue 9 years ago • 14 comments

sahildua2305 avatar Aug 22 '16 21:08 sahildua2305

Hi sahidula, What is an endpoint in this context? I am looking to get involved with open source projects but I am still quite new. I am very familiar with Git, so version control shouldn't be an issue. Can you please point me in the right direction for getting started with adding unittests for this project? Thanks.

yemarnevets avatar Oct 15 '16 09:10 yemarnevets

@yemarnevets Just check for 2xx, 4xx and 5xx response, if any, from the HackerEarth API for some sample input. @sahildua2305 Am I right?

mananpal1997 avatar Oct 19 '16 11:10 mananpal1997

I'm not sure @mananpal1997

Probably what I wanted is to write tests to ensure quality of this project not for validation of HackerEarth's API validation. We should have tests in this project so that we can make sure new contributions aren't breaking anything. I'd encourage you to research on this a bit with @yemarnevets regarding what will be the best way to implement this.

sahildua2305 avatar Oct 19 '16 11:10 sahildua2305

@mananpal1997 @yemarnevets Any update on this?

sahildua2305 avatar Oct 31 '16 18:10 sahildua2305

If a make some time, I will collaborate with unit testing :grinning:

aboglioli avatar Dec 27 '16 05:12 aboglioli

@aboglioli That'd be great! Let me know if you need help

sahildua2305 avatar Dec 27 '16 20:12 sahildua2305

@sahildua2305 Hello, can I give this a try?

cnguy avatar Jan 11 '17 16:01 cnguy

@ChauTNguyen Sure 🙂

sahildua2305 avatar Jan 11 '17 19:01 sahildua2305

@sahildua2305

https://gist.github.com/ChauTNguyen/13ebafa8ea4f450ce40575bca3f78034

Hi, I'm working on it. However, I wanted to know if I'm starting it out correctly/heading in the right direction, so I wrote just a few basic unit tests.

dependencies: selenium 3.0.2

I started out by covering:

  • loading the site, and compiling to see if the UI and compiling the default works properly (ex: Compile Status: OK)
  • loading the site, and giving failing input to see if the UI works properly (ex: Compile Status: --)
  • turning on the checkbox should add the custom input display, which allows the user to send in custom input. user dumps some input in, and after running the code, the custom input should then be re-displayed within stdin.
  • user does a simple hello world program and runs the program to get a link to the saved code. user then goes to that link (and I tested if the input stays the same) and runs the code, and the output should contain the hello world

I used sleep commands for the short compiles and refreshes (to give DOM time to render).

cnguy avatar Jan 11 '17 22:01 cnguy

@ChauTNguyen looks good. Can you please create a PR for the same?

sahildua2305 avatar Jan 12 '17 11:01 sahildua2305

Hello, I am new to open source. Can I contribute to issue #44 ?

PrathameshPalaskar avatar Jun 05 '17 22:06 PrathameshPalaskar

@PrathameshPalaskar welcome. Thanks for showing interest to contribute to this project.

As you can see there's already a pull request for this issue. Do you have any extra ideas about how you would want to do this?

sahildua2305 avatar Jun 06 '17 17:06 sahildua2305

Re-opening this because the PR https://github.com/sahildua2305/hackIDE/pull/44 was never submitted and this is likely up for grabs.

sahildua2305 avatar Oct 18 '20 02:10 sahildua2305

Is this issue still open? I would like to contribute with some unit tests.

arvind2221994 avatar Oct 15 '21 11:10 arvind2221994