Currently the msbuild logs for team build are appalling as they are just plain text and are very difficult to read. Also the ones created by my build are approx 30Mb and take quite a while to download (our TFS server is in our datacentre).
Does anyone know any way of being able to view these logs easier, prefereably integrated with either TFS itself or TFS WebAccess?
Take a look at the following blog post I did a while ago:
http://www.woodwardweb.com/teamprise/000415.html
This describes how to create a simple ASP.NET page that will stream the contents of your log file to you over HTTP. The advantage of doing it this way is that you don't have to wait for the entire page to load before the log starts to render for you in Visual Studio.
Also - you can add some simple formatting to the file while streaming. In the example on my blog I simply make the start of each target appear in bold to make them stand out a bit more, but you can see how you could go crazy with this approach if you wanted.
If increasing bandwidth isn't an option then I would suggest you to write your own html logger and attach it to the build process. Splitting the html build log into minor parts (definded by targets and/or projects) and having one index file pointing to all the minor parts with appropiate information whether a given part failed or succeeded. Then you only need to parse the index file and any requested part over the link.
A third possibility is to compress the log-file after the build completes.
Related
I am new around here, I have done a lot of googling, searching on this site and asking around and have not found a satisfactory answer.
I develop automated tests, UI as well as API. These are then run by TFS and the results are put into a JUnit xml document, which is then read by TFS. But alas the formatting is atrocious and leaves one unable to use the output for anything.
Vis:
There is no information about the Test Suite (which is there in the XML), the actual request sent (which is in the log) or response received and so one is left with absolutely no context to understand what has actually taken place (which request was sent, what test group/suite it belongs to and what any potential error was).
As far as I have been able to uncover, TFS simply has little to no support of proper test result formatting when it comes to automated testing. I am very surprised by this in 2018. Not even any documentation that allows me to develop my report structure/format in some kind of script.
What alternatives do I have? Can I automatically attach a generated HTML report somehow in TFS? Can I output more info anywhere?
You can group by Test Suite, Owner, Priority etc...
And you can double click the specific test result and navigate to the test run Summary to see more information there, also you can attach files there.
More information please see Review continuous test results after a build
This is a broad question, so any answers are deeply appreciated. I need to continually log the size of several build files (in this case some CSS and JS files), preserve this log and ideally show it as a dashboard in Jenkins.
I know that I can setup a cron job and execute a bash script to grab the files and log their size, but I'm not sure where this file would live and how to display it. Ideally the result would be a dashboard plot or bar graph over time.
Thanks.
P.S. I'm open to other logging suggestions, but Jenkins seems like the appropriate system to do this in.
Update: this isn't perfect but it works. Google Spreadsheets has a simple API for posting data, so this can work as an endpoint for any script you want to write that logs your data.
It's not a Jenkins solution, but gets the job done.
In my search leading up to this, I did come across JMeter, and the Performance Plugin for Jenkins, which were contenders for a possible solution.
I guess the title is pretty self-explanatory. The reason I want that is so that I can make a live custom HTML reporter for my tests.
My test suite takes hours to complete, and although the tests generate HTML reports as soon as each test step is executed, it's only at post-build time that those report files get published.
Being able to see them as they get generated would reduce the time it takes for me and my teammates to analyze and act upon issues revealed by our test runs.
All I need is that Jenkins let me access the build files as the build executes. Nothing fancy; I can take care of the rest. Is that possible? How?
In our setup there is always an intermediate file (typically XML) but the HTML files are created at the end of the job.
What you can do, is use the progressive output (http://jenkins/job/jobName/buildNumber/logText/progressiveText?start=0). Although you don't state which framework you use, most of them output something that would be easy to parse. e.g. "Test xxx failed".
TeamCity has a feature that (as near as I can figure) is called "service messages". You can see the documentation here. Essentially, it lets me write things like
##teamcity[publishArtifacts '<path>']
to tell the build server to do things. I like this feature. It lets me include the build server steps in my build scripts (and thus in source control) rather than as a configuration on the server. This makes migrating to a different server or recovering from disaster more reliable, "documents" this behavior, and allows multiple builds to leverage it without additional configuration. It's several less things people have to remember to set up when they make new build configurations, and it's much easier to write print '<message>' than it is to load the build server's web interface and drill through several pages looking for the right configuration page.
I've looked around, but I haven't been able to find anything that does this for Jenkins. Does Jenkins have anything similar?
I've seen a couple iOS apps that allow access to svn logs, but none as nice as iOctocat is for git. It appears I could use iOctocat on a network to collect all the data, and then view it offline. I need to do that for svn, not git.
I'm looking for a way to read svn log commit diffs in an offline state on an eReader (prefer iPad, but could switch to say Kindle Fire if required.) Is there any OSX software/scripts that can get an svn server log, perform diffs, and output into files for viewing on an iPad, or alternatively, into a PDF that can be viewed darn near anywhere?
I'm trying to get a bit more productive on my 1.5 hour bus ride, and this could help tremendously...
Git is a DVCS which consists in having the whole repository, with its whole history, on every "client" machine. SVN is a centralized VCS, where the working copy only has the latest version of every file. The history is only available on the server.
If offline work is so important, git is obviously a much better choice, and you should switch to git. I don't think any SVN tool will ever give you access to previous versions offline, because that's just not how SVN works.
If you just want to review the logs, you can generate a PDF file easily enough. The command:
svn log | enscript -o log.ps
makes a PostScript file from the log for the current working directory. You can follow that with:
pstopdf log.ps
to generate log.pdf, a PDF file that contains your Subversion log. You can obviously automate that process to your heart's content. You might even run the process every few hours and post the result on an internal web server where it's easy to grab. You can also make the PDF file that you generate a lot fancier by configuring enscript, which has oodles of options (font, margins, columns, headers, footers, etc.) so you can make a really nice looking file.
For convenience, here's a version all on one line:
svn log -l 10 | enscript -o - | pstopdf -i -o svnlog.pdf
The -l 10 option to svn log limits the output to the 10 most recent log entries -- customize that as you wish, or customize the output with other options.
The next step would be to write a shell script or other small program that would filter the log to show just the most recent changes, generate diffs for the changed files, and wrap that all up into a PDF for you to review. As you can see from the above, the tools you'd need to do that are already there -- you just need to put them together in the right order.