Serenity Reports Logo Change - selenium-webdriver

I am using Serenity with Jbehave. I would like to know how to replace the current report's default logo of serenity with a custom company logo. what is code changes need to be done for changing the default logo?

You can do that by replacing the serenity-bdd-logo.png in serenity-report-resources-x.x.xx.jar. Save your logo and name it likewise, then copy and overwrite the existing one. Mine is stored in the following location:
serenity-report-resources-x.x.xx.jar\report-resources\images\
This should work for any project running on your machine and using that single jar file. It is made easier with Maven as it stores all downloaded dependencies in one location.
Otherwise, I doubt there is any legitimate way to perform this trick. You can write Java code to rename your logo and copy it to reports location each time you run serenity reports, but all that are just hacks really :)
Serenity reports are built out of FreeMaket Template Language (.ftl) files stored in serenity-report-resources-x.x.xx.jar (another possible solution is to overwrite these and reference your own file each time serenity-bdd-logo.png is mentioned). Ideally you would want to create your own jar and force serenity to use this one. However, that seems a lot work just to replace a logo. Makes sense if you want to overhaul the whole look and feel of the reports.

Related

Multiple Similar (Duplicate) Reports

I currently created a report that I would like to duplicate 40 times but with a different filter each time. So far I'm afraid this is only possible with a very manual process but I was hoping if someone has a faster solution?
Would it be possible to connect to the DataStudio API (if there is one) and run a script for this?
Also, making a design change can be problematic as it needs to be copied to 40 reports. Does anyone have a suggestion for this?
A report is stored as an RDL file in the file system. Its of XML format. Make a copy of the file in the file system and open the copy using a text editor (I prefer notepad++) and find the parameter. Change the paramater to whatever value you want it to be and save the file under a different name. I would include the parameter name in the report name. If the report as using 'Memphis' I would name the report Sales_Memphis.RDL.
Do this 40 times. Be very careful about not changing the structure of the XML file (Don't change any of the element names or opening and closing symbols(<>). Re-import the file into SSDT report project to verify it is using the correct value.
To import a file into an existing project:
Right click on “Reports” folder and select “Add” then “Existing Item”
Now file browser window will open.
Find the file and double click on it.
Ideally you can have a dropdown with all the possible values for users to choose from but I guess that is not appropriate for your needs.
If this is a good solution please check it off as valid solution.
I checked this with google support and apparently there is no way yet to do this.
There are currently no API's available to do this nor can you download something similar to an RDL file. Right now the only way is manual duplication and to make adjustments for each report separately.
Have you looked into custom bookmarking. It sounds like it might be able to address the problem you're expressing. This way you would only have one report, but the links you would share would automatically apply the correct filter value.

Is it possible to use Git as source control for code stored in a database?

I work on Labware LIMS, which has both configuration, and customization via its own programming language and internal code editor, and stores this customization code in database records. (Note, not the source code of the actual application itself, just the customization code a.k.a. LIMS Basic.) Almost everything in LIMS is stored in the database.
We want to investigate the possibility of using source control to protect this code but we don't know much more than the theory of using something like Git. (I have worked as a junior QA and used git but not as a dev and my knowledge is limited!)
Of particular use would be the merging tools, as currently we have to manually merge code in a text editor, if we even notice there is a conflict (checking content between dev and live is time consuming and involves using multiple tools, some of which are 3rd party tools we have developed ourselves, which are hit and miss. I personally find it easiest to cut and paste into a text file and then use Beyond Compare.
There is no notification that the code is different when moving it from dev to live (no deployment as such, you just import an xml file) so we often have things going live that someone was working on unbeknownst to each other. I.e. dev 1 is working on the code in object 1, dev 2 gets a ticket to make a change to object 1, does so and puts their change Live, whatever dev 1 was doing is now also Live in whatever state it was in. (Because we don't always have time to thoroughly check what state each object is in between up to 3 different databases.)
Is it possible to use source control just on the code within the database, but not necessarily the database itself? (We have backups and such for that but its easy for some aspects of the system to get overwritten by multiple devs working on overlapping areas at the same time.)
If anyone reading this has any specific knowledge of LW LIMS, we are referring to the Subroutines mostly, we have versioned Analyses which stands in for source control for the moment and is somewhat effective but no way to control who is doing what on the subroutines other than a comment log at the top. I have tried to find any information on how other teams source control their code in LIMS but to no avail.
The structure of one of these tables can range from as simple as the code just existing in one field as a straight text dump with a few other fields such as changed_on, changed_by and name (Subroutines), or more complex with code relating to one record being sprinkled around in multiple rows on another table entirely (Analyses) but even if it could just deal with the simple scenario to start with that would be great!
TL;DR: Could the contents of the Code field in a database record be treated like a regular code object in other dev environments somehow and source controlled using Git? (And is anyone willing to explain it simply for me to follow?)
As you need to version control table fields of subroutine, but LW LIMS doesn’t have the IDE for version control (such as git, svn etc). So the direct answer is no.
If you really want to do version control for the codes in database, you can create a git repository and only put the codes in git repository. when a file has updated, you can commit & push the changes. And it’s easy to compare the difference between versions.
More detail about git, you can refer git book.
LabWare LIMS has a number of options for version control. You COULD version the Subroutine table by adding a SUBROUTINE.VERSION field to the table, this works the same way as other versioned tables in LabWare where it asks you if you would like to create a new version of the object before saving. There are a few customers I work with that have done this.
Alternatively, (and possibly our more recommended method prior to LEM) there is the Snapshot capability where the system automatically takes a "snapshot" of objects as they are saved - when viewing these you have the ability to view them side by side in a comparison dialogue - it will show < or > for lines which are different.
Another approach is, if you have auditing turned on you are able to view the audit history for changes to specific objects - this includes subroutines.
One other approach is to use configuration packages - this has the ability to record version AND build numbers. Though individual subroutines is probably a bit too granular for it's intended design.
Lastly, since this question was originally posted we have developed a product called LabWare Environment Manager (LEM) which has some good change control functionality built-in.
For more information on the suggestions above, please have a look at the LabWare Technical manual for the version you are on. We also have a mailing list for questions like this to be posted. You might find an answer there. If you have access to our Support webpage you're able to search previous questions that have been asked. I'd also suggest that you get in touch with your Account Manager at LabWare who can help you answer some of your questions.
HTH

Indesign real-time package for collaboration

I manage a team of designers working on Indesign.
When we work on a project, it often happens that a designer has to work on the project of another. We work with Dropbox for Business.
But when we take the work of another designer, there is often missing links and fonts.
Is there a plugin or a way to develop a plugin that would allow, when we create a new indd file (or for the protection of the same file):
Automatically create a "Links" folder and another "Document fonts" at side of the indd file
Systematically add a new link or new typography in the corresponding folder?
To simplify: each action on font or on a link, make a kind of "Indesign Package" in real time?
If this is not a solution, do you have any solutions to meet this need?
I don't know of a specific script or plugin that does this.
However, it should be possible to write a script with an eventhandler with a beforeClose event that runs certain script commands every time a user closes a document (or even every time a user adds, changes or deletes a link). At this point the script could run some copyLink commands on all the images and fonts (?) placing them all in the folders next to the document.
The whole script could be made a startup script, so it becomes active anytime any user runs InDesign.
(I'm actually not sure, if fonts can be copied so easily. Worst case scenario would be that the script would need to run some packaging command to gather the fonts somewhere, copy them over to where you need them and then delete the rest of the temporary package.)
Did you consider Creative Cloud Libraries ? They are meant to allow sharing assets within a team. Apart form that, you users would need to have a same access to the file system (a common drive letter for the network path for example).
Another solution would be to use a DAM solution so users would link files from the DAM.
Eventually, you could sure think of a script as mdomino offered.

Migrating data from one DotNetNuke portal to another

I have a pretty old DotNetNuke installation which is broken (in more than one way) and won't let me upgrade. I've set up a new installation and want to move the content. The old portal has a massive amount of data, so moving it manually will take very long.
Is there any way of migrating between portals without manually copying?
I know tools exist to do this between SharePoint portals.
I'm capable of doing SQL and even writing a few lines of code if required.
It depends on where your data is stored. Some modules will implement the "Portable" feature, which means that you can export them with content. However, there's not even a great way to export all of your content at once. You can export a portal template (from Host -> Portals), but if you're upgrading a lot of versions, the new version won't be able to handle the old version.
If your information is in a lot of different modules that don't support the "Portable" feature, you'll need to consider each of those modules separately (probably doing some sort of SQL export specific to each module).
I'm facing this issue now. PokerDIY.com has a massive amount of user-dependant data but runs like a dog. I want to start fresh on DNN 7.1 with a clean install and move the relevant data across and make new pages and content. (I guess by not moving the modules and tabs across it is a bit easier).
Considering the Users will get a new UserID I will have to use email address to map any table with a USerID from the old DB to the new one... this is going to be no small task ;)

How to keep Stored Procedures and other scripts in SVN/Other repository?

Can anyone provide some real examples as to how best to keep script files for views, stored procedures and functions in a SVN (or other) repository.
Obviously one solution is to have the script files for all the different components in a directory or more somewhere and simply using TortoiseSVN or the like to keep them in SVN, Then whenever a change is to be made I load the script up in Management Studio etc. I don't really want this.
What I'd really prefer is some kind of batch script that I can run periodically (nightly?) that would export all the stored procedures / views etc that had changed in a given timeframe and then commit them to SVN.
Ideas?
Sounds like you're not wanting to use Revision Control properly, to me.
Obviously one solution is to have the
script files for all the different
components in a directory or more
somewhere and simply using TortoiseSVN
or the like to keep them in SVN
This is what should be done. You would have your local copy you are working on (Developing new, Tweaking old, etc) and as single components/procedures/etc get finished, you would commit them individually until you have to start the process over.
Committing half-done code just because it's been 'X' time since it was last committed is sloppy and guaranteed to cause anyone else using the repository grief.
I find it best to treat Stored Procedures just like any other compilable code: Code lives in the repository, you check it out to make changes and load it in your development tool to compile or deploy the code.
You can create a batch file and schedule it:
delete the contents of your scripts directory
using something like ExportSQLScript to export all objects to script/scripts
svn commit
Please note: That although you'll have the objects under source control, you'll not have the data or it's progression (is that a renamed field, or 1 new field and 1 deleted?).
This approach is fine for maintaining change history. But, of course, you should never be automatically committing to the "production build" (unless you like broken builds).
Although you didn't ask for it: This approach also won't produce a set of scripts that will upgrade a current DB. You'll only have initial creation scripts. Recording data progression and creation upgrade scripts is beyond basic source control systems.
I'd recommend Redgate SQL Compare for this - it allows you to compare database versions and generate change scripts - it's also fairly easily scriptable.
Based on your expanded question, you really want to use DDL triggers. Check out this article that details how to create a changelog system for your database.
Not sure on your price range, however DB Ghost could be an option for you.
I don't work for this company (or own the product) but in my researching of the same issue, this product looked quite promising.
I should've been a little more descriptive. The database in question is for an internal ERP system and thus we don't have many versions of our database, just Production/Testing/Development. When we've done a change request, some new fancy feature or something, we simply execute a script or series of scripts to update the procedures in question on the Testing database, if that is all good, then we do the same to Production.
So I'm not really after a full schema script per se, just something that can keep track of the various edits to the stored procedures over time. For example, PROCESS_INVOICE does stuff. It gets updated in some minor way in March. Some time later in say May it is discovered that in a rare case customers get double invoiced (or some other crazy corner case). I'd like to be able to see what has happened over time to this procedure. Currently the way the development environment is setup here I don't have that, which I'm trying to change.
I can recommend DBPro which is part of Visual Studio Team Edition. Have been using it for a few months for storing all parts of the database in Team Foundation Server as well as for deployment and database compares, etc.
Of course, as someone else mentioned, it does depend on your environment and price range.
I wrote a utility for dumping all of the relevant parts of my db into a directory structure that I use SVN on. I never got around to trying to incorporate it into the Manager but, if you're interested, it's here: http://www.reluctantdba.com/dbas-and-programmers/sqltools/svnforsql2005.aspx
It's free and, since I regularly run it, you know any bugs get fixed quickly.
You can always try integrating SourceSafe with SQL Server. Here's a quick start : link . To work with it you've got to have Managment Studio Developers Edition.

Resources