git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [GSOC] Contributing to git.

From
ASAndrew Sayers <andrew-20120330@pileofstuff.org>
Date
Mar 30, 2012, 22:39 UTC
Message-ID
<4F763614.1010503@pileofstuff.org>
In-Reply-To
<201203301305.23567.jnareb@gmail.com>
On 30/03/12 12:05, Jakub Narebski wrote:
Show 5 quoted lines
> But even if the JavaScript tests would have to be run in browser (like
> most of all of them seems to), having any automated test for gitweb's 
> JavaScript code would be a very good idea.
> 
> P.S. I wonder how JavaScript-scriptable Veracity DVCS solved that...

JS test suites generally run in the browser because knowing that your tests pass in some sane command-line compiler tells you nothing about how it will be mangled by IE (or in rare cases, other browsers).

IMHO, the best thing to do with JS unit tests would be to make them easily available from gitweb. Then when someone reports a bug, you just ask them to run the tests in their browser - the pattern of errors will quickly show you that e.g. their AdBlock filters are getting a bit overexcited about all these `git add`s it can remove (that sort of thing was a frequently-reported problem at my last job).

Obviously it's good to run tests automatically too - you might want to consider writing tests with QUnit[1] and automating them with Selenium[2]. The former is designed to be appealing to human eyes and trivially testable with the latter (although I'd expect other suites to include the necessary <div>s with the necessary id's too). I haven't used the Perl interface myself, but I'm sure you could make some TAP output with WWW::Selenium pretty easily.

	- Andrew
1. http://docs.jquery.com/QUnit
2. http://seleniumhq.org/
Previous: Jakub Narebski
Message 15 of 15 in “[GSOC] Contributing to git.”
  1. jaseem abidMar 30, 2012
  2. Jeff KingMar 30, 2012
  3. jaseem abidMar 30, 2012
  4. Jakub NarebskiMar 30, 2012
  5. chaitanyaa nallaMar 30, 2012
  6. Jakub NarebskiMar 30, 2012
  7. chaitanyaa nallaMar 30, 2012
  8. jaseem abidMar 30, 2012
  9. jaseem abidMar 30, 2012
  10. Jakub NarebskiMar 30, 2012
  11. Nazri RamliyApr 2, 2012
  12. jaseem abidApr 2, 2012
  13. Nazri RamliyApr 3, 2012
  14. Jakub NarebskiApr 3, 2012
  15. Andrew SayersMar 30, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.