Before you attempt the command line export, you'll need two pieces of information:
You can get your project ID from the browser location bar once you open the project in the main Dradis interface (8 in this example):
The location of the template can be anywhere in the appliance. However, if you used the web interface to upload your template there is a good chance it would have ended under this location:
However, to make the examples more readable we'll use
/tmp/test-01.docx as the sample location of our template in the following steps.
Remember that when you're working in the console of your Dradis Pro appliance, 9 times out of 10 you'll need to run commands as the
dradispro user and not the
SSH into the console as
dradispro, then navigate to the current folder:
$ cd /opt/dradispro/dradispro/current/
Now lets get some help/usage information by running the following command:
$ RAILS_ENV=production bundle exec thor help dradis:pro:plugins:word:export
The expected output is:
thor dradis:pro:plugins:word:export --template=TEMPLATE
[--output=OUTPUT] # the report file to create (if ends in .docx or .docm), or the directory to create it in
--template=TEMPLATE # the template file to use. If not provided the value of the 'advanced_word_export:docx' setting will be used.
Export the current repository structure as a Word document using the .docx format (uses Issues and Evidence)
The two parameters are optional, but we'll use both in this guide.
For our example, with a project ID of 8, the command we need to run is this:
$ PROJECT_ID=8 RAILS_ENV=production bundle exec thor \ dradis:pro:plugins:word:export \ --output=/tmp/ \ --template=/tmp/test-01.docx
When the exporting process starts, the output should look like this:
Project found. Scoping all models to Project 8.Loading .docx template...
Found 3 issues affecting 2 nodes
Found 3 notes affecting 0 new nodes
The process will end either with a horrible stack trace:
.../processors/ooxml/processor.rb:252:in `binread': No such file or directory - .../attachments/397/Help%20Desk%20Pricing%20%E2%80%BA%20(20131019).png (Errno::ENOENT)
from /../processors/ooxml/processor.rb:252:in `block (2 levels) in process_docx_archive'
from /../processors/ooxml/processor.rb:250:in `each'
from /../processors/ooxml/processor.rb:250:in `block in process_docx_archive'
from /../ruby/2.0.0/bin/thor:23:in `<main>'
zlib(finalizer): the stream was freed prematurely.
… or a friendly “all done” message:
Report file created at:
If you get the nasty stack trace, skip to When the export fails
If you get the “all done” message, move on to the next page, Missing content.
Next help article: Missing content →