1

What is the best way to unit test a Google Chrome extension?

I need to unit test various JavaScript functions and content-scripts on the websites they were designed for, as well as automate user input on the webpages my content script are injected into.

Is there anyway I can automate this testing process?

user1876122
  • 133
  • 1
  • 9
  • Do you have any specific extensions that you need to test for? You really would need to make a specific unit test method for such a thing. – Qantas 94 Heavy May 14 '13 at 12:23

1 Answers1

1

If you are asking about unit testing, it will be same as any other javascript code. Remember unit tests should be as small as possible and they shouldn't touch (they can mock) any external API. If you are asking about integration testing, than its a different matter.

Juzer Ali
  • 4,109
  • 3
  • 35
  • 62