Generating HTML report from browser - code-coverage

When using intern locally in the browser through intern/client.html?config=test/intern,
is it possible to generate an html report file if my test/intern.js file is defined as:
define({
...
reporters: ['html']
});
Or the is the file generation possible only when running from node?
Also, how can I set the location where the report file will be saved?

As you guessed, file generation is only supported from Node (using intern-client or intern-runner). The browser client is not capable of generating files, and in any case the 'html' reporter provided with Intern can only generate HTML output in a browser, so currently the only built-in way to get an HTML test report file is to manually save the report from the browser.

Related

Problem with Jenkins HTML Publisher Plugin and relative pathes in HTML report file

I'm using the Jenkins HTML Publisher Plugin for publishing HTML test reports to the job and build. The test reports and error screenshots I add after every build to the artifacts. And later I use the HTML Publisher Plugin to link to the report HTML file in the artifacts.
The test reports contain the error screenshots with relative pathes src="./../errorShots/ERROR_screenshot_2019-06-04_02:19:29:529.png". And it is running when I open the report HTML file directly under the artifacts in the specific jenkins builds. Then the images are correctly visible.
But when I'm using the HTML Publisher Plugin to link to exactly this test report HTML file the relative pathes are not working. So, the links to the embedded images are not working anymore and the images are not visible, because the relative link path seems to be wrong.
So, how can I solve the problem? I think the plugins does not create only a link to the target HTML file. If it would do that it should running with relative pathes in HTML report file.

Web API Folder to place template Reports (rpt, xml, etc.)

I have my Web API project, and one its controllers will generate Reports on the fly (PDF, Excel, etc.)
In order to generate the Reports, I have the template files rpt (crystal reports), xml (componentone), etc. My question is where is the recommended folder to place those files.
Note. The generated report won't be saved on server, the controller will just response the stream to the client.
I would put them into "~/Content/Reports" and read from there.

How do I write a Dart web app that uses spawnUri and works with both Dartium and dart2js?

I want to write a concurrent web app (using either raw Workers or isolates as workers). The Dart API for isolates is spawnUri, which takes a URI that points to a script.
In Dartium, that script is a .dart file. In Chrome/Firefox/etc that script is a .dart.js file.
I need to detect what runtime I'm in so I can configure the URI for spawnUri correctly. What is the best way to do this?
SpawnUri automatically appends ".js" when compiled to JavaScript.
How about using transformers? Here is a document about how transformers work, some Google internal documentation. There's also some info about transformers on pub pages - assets and transformers. What you could do is use transformers to output "rewrite" your files a bit to use correct url.

Single File Upload - Flash (swf)

Is it possible to upload files to a server, with flash only? I'm looking for a SWF file that's able to do this task. So my question is:
is it possible to upload a file with flash alone (no PHP or ASP)
in case this is possible: is there a simple SWF-file to do this task which I could use?
is it possible to upload a file with flash alone (no PHP or ASP)
Of course not - how will the server know what to do with the file if there's no server side script?
in case this is possible: is there a simple SWF-file to do this task which I could use?
In general, you'll also need JavaScript (and somewhere to post the file to, so some server-side script).
This one is a self-contained solution: http://code.google.com/p/swfupload/
Otherwise, this jQuery plugin is quite good: http://www.uploadify.com/

Customizable / Dynamic SWF generation

Wondered if anybody knows how customizable Flash swf files are made, where there appears to be a template swf that the user can then input some changes (eg text or image) and receives a newly-compiled swf file with their changes.
Some examples:
- http://flashfreezer.com/landingconfetti/index.html
Constraints:
- user receives a single output swf file that can be played with all their changes included. ie there is no reading from an xml file, or using Flashvars.
Been trying different things for a few weeks with no luck!
There are a number of ways, but generally the most common is to either use a SWF generating library (like PHP's) or through server-side compiling.
Normally, this will be a custom or proprietary library which uses the same language that the serve is running (and there are open-source libraries for this in PHP, Perl, Python, Java, C++... etc). The SWF is generated and served up with the appropriate headers so that the browser knows how to re-direct it. Often this will involve a pre-defined template which is then modified slightly for the new input. Only occasionally does this involve the manipulation of pre-generated SWF directly.
The other option is to have a command line call to the Flash IDE or the Flex compiler (and, technically, this can work for CS3 and CS4, though in a very nasty and hackish way) to generate a new version of the SWF on the fly. This is often slower, but it will generally yield a more finished feel to a product.
You could try Swiffotron. It can modify SWF files and do text replace type things on both text elements and in compiled actionscript.
Here's a swiffotron xml job file that does some text replacing.
And here's a swiffotron XML job file that modifies instances on the stage.
I didn't check the site, but the only way I can think of is to read the requirement details through flash (this can be done through plain html also) and then generate the AS files from their templates and compile them at the server side (using mxmlc or other compilers) and give back the SWF.
I get the impression that you're looking for SwfMill. SwfMill creates a swf based on an XML file that you create/define. You could use SwfMill on the server to generate a swf based on user input.

Resources