[英]Automated W3C Validation
I'd like to use MSBUILD to check the validity of both the rendered HTML and CSS of all pages in a site, and break the build on errors. 我想使用MSBUILD来检查站点中所有页面的呈现HTML和CSS的有效性,并打破错误的构建。
Can anyone recommend a strategy to validate HTML and CSS in an automated build? 任何人都可以推荐一种在自动构建中验证HTML和CSS的策略吗? Are there any tasks out there to do this now?
现在有什么任务可以做到这一点吗?
I can't tell you how to do this in MSBuild, but I can tell you how I would approach this task. 我不能告诉你如何在MSBuild中这样做,但我可以告诉你我将如何处理这个任务。
*Step # 5 will be somewhat tricky because you'll likely have to maintain a list of URL's to test, since you cant just open up the .aspx files, and if you're running MVC, the urls will be almost impossible to automatically generate based on the files themselves due to routing etc. *步骤#5有点棘手,因为你可能不得不维护一个要测试的URL列表,因为你不能打开.aspx文件,如果你正在运行MVC,那么网址几乎不可能自动生成由于路由等原因而生成的文件本身
Seems like someone could easily make a CSS (maybe one for staic html too) validator plugin for Hudson or CC.net quite easily, you could even display the results quite nicely in a trend graph, etc. 好像有人可以很容易地为Hudson或CC.net轻松制作一个CSS(也许是一个用于staic html的)验证器插件,你甚至可以在趋势图中很好地显示结果等。
I haven't played around with using MSBuild to do this stuff too much because I use Hudson. 我没有玩过使用MSBuild这么做太多,因为我使用Hudson。 However, I think you should be able to do all of this quite easily as post build commands since its all just command line stuff.
但是,我认为你应该可以很容易地完成所有这些作为post build命令,因为它只是命令行的东西。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.