DEV Community

Klaus for Endtest

Posted on • Updated on

Can you believe I made a test that can play Chess?

I have been experimenting a lot with the Endtest platform lately, since I'm helping them out with my testing expertise.

Trying to find extreme scenarios that cannot be automated, I ended up trying to automate some tests for a Chess game.

Needless to say, it went pretty well.

As you can see, my test played a decent game.

The assertions are checking if my movements were registered correctly.

What made it easy is the fact that all the pieces and squares are actual HTML elements.

If I was dealing with a HTML5 Canvas element, I would have needed to use the Click with Offset action.

I talked to them and sent them the video, ended up being posted on their YouTube channel.

Can you think of any site or scenario that is impossible to automate?

Would love to get some fresh ideas.

Oldest comments (4)

Collapse
 
battleofchess profile image
Battle Of Chess

Kudos, Klaus! I myself tried playing on quickchess.net & I won 5 games straight!!

Funny enough, I am not a developer but here is what I build - Play Chess Against Computer

Have a look & do share your feedback.

Collapse
 
mr_giveaways_ profile image
MR Giveaways

Same i am a developer and i biult this playchessagainstcomputer.co.uk
please checkout as well.

Collapse
 
markrigby653 profile image
Mark Rigby

Hi,
I created this Next Chess Move Calculator

Collapse
 
taylorsinha profile image
Taylor Sinha

Hey! You did great.
Look, I'm learning JavaScript and I made this Chess Move Calculator with JavaScript. Have a visit and please suggest, how can I make it better.