I have desktop utility app to upload updates and create new user stories to Rally. I am using a WPF Richtextbox and am using the XAML to HTML conversion demo found on MSDN.
When i try to upload the user story that has richtext formatting it fails with the following error in the CreateResult object:
"Cannot parse input stream due to I/O error as JSON document: Parse error: expected '}'
but saw 'f' [ chars read = >>>{\"hierarchicalrequirement\":{\"Name\":\"Test
Story\",\"Description\":\"<HTML><BODY><P><SPAN STYLE=\"f<<< ]"
This is the entire string:
"<HTML><BODY><P><SPAN STYLE=\"font-weight:bold;\">This is a test</SPAN> of a new story.</P></BODY></HTML>"
When i read in another user story that has bold text it uses the "strong" HTML tag. The converter uses only inline CSS. Does the Rally API support inline CSS and i just need to reformat the string since it fails at the first quotation mark (")?
Thanks
Rally supports much in the way of markup in the Description field - I think this is related to the version of the .NET REST DLL that you are using, rather than a Rally server-side issue. I tested creating a story via the most current .NET REST Toolkit using your test string, was able to correctly create the Story, including the formatting.
What version of the .NET REST Toolkit DLL are you using? Some versions had an issue serializing the data into JSON when some strings contained HTML markup.
The most current version: REST .NET 1.0.15 DLL that I used in my testing, successfully creates a User Story with the above Test String that includes the markup of interest - no parsing errors were seen.
Related
I have to test an API that allows user to create a profile and profile has a picture. Currently API taking picture value as base64 string.
Something like this.
<ImageContent>BASE64 STRING VALUE</ImageContent>
In UI code is decode this Base64 and shows image.
Now I have to write a test to test the API. Is there any Library available in SOAP UI Groovy Script that I can write and provide solid test around this?
I searched the Internet and found this, but its not the complete answer and decided to create this question.
reference link :
http://community.smartbear.com/t5/SoapUI-Open-Source/Decode-base64-string-to-an-image-pdf-or-png-using-groovy/td-p/19846
Has anyone made where, where you just enter your swagger URL .../swagger/docs/v1
and then the website converts it to HTML, pdf, doc or whatever in a nice readable format? I'd think that site would get a lot of traffic (hint)
I know there are some things on github you can download that will convert things, but I'd think someone has made a public site so I can save some time.
You can use this website : Swagger Editor
Copy your swagger file and in the menu, select 'Generate Client' -> 'HTML' (or Dynamic HTML')
You can also use Swagger Code Generator if you want to add this step in an automatic build flow.
Try this one: swagger2html .
The document generated by swagger-codegen is indeed not readable. This project makes a neat appearance(bootstrap css) and shows the fields in the request/response models in a straightforward manner.
I have developed a custom report in Rally - and this needs to be integrated in the Sharepoint portal - how do I proceed doing this ( similar to the standard reports working in the API Kit and through Javascript on sharepoint) ?
Am using Sharepoint 2010 and 1.0 version of Rally
Raghu
As Nick says, there's nothing in the api that will help you here, but you might be able to get what you want "manually". The "shape" of the custom report endpoint url is:
https://rally1.rallydev.com/slm/analytics/reports/<id>/run?PROJECT=<project oid>
where <id> is the id of the report (which you can get by hovering over it in the Reports tab index) and <project id> is the id of the project from which to gather data.
ex:
https://rally1.rallydev.com/slm/analytics/reports/1001883/run?PROJECT=20383843
(don't bother trying that as is, those are dummy ids). You'll still need to use the appropriate LoginKey.
Custom reports created on Rally's Reports>Reports page do not have an equivalent to StandardReport component in legacy AppSDK1 or StandardReport in AppSDK2. In the absence of a similar wrapper for custom reports it is not possible to display them outside Rally the way Standard Reports can be displayed.
You may however write your own javascript custom app (using AppSDK1 or AppSDK2), build a deployment html file out of it and paste the html code to Sharepoint web part. This app will have to access Rally data you want to visualize in a grid, for example.
Also, both Standard Reports and custom reports on Reports>Reports page are generated by legacy analytic service. It does not support the new ApiKey. In the case of StandardReport you need to use old LoginKey.
I am documenting a library that has a Python component and a JavaScript component. The overall user documentation, and the Python API documentation are in reStructuredText, processed with Sphinx. The JavaScript API is in jsdoc and is processed with jsdoc-toolkit. The principal output format will be HTML. I am new to reST, Sphinx and jsdoc.
I have set up a build system so all the generated html pages are dumped into a single directory tree. I now need to insert into the main page (generated from reST) a link to the generated Javascript documentation. This needs to be a relative link, since the docs may be located in different places on different installations. reST will automatically parse a full URL, but I can't figure out how to make it insert a relative link. Constructs like :ref: and :doc: don't seem to help, because they expect the target to be reST.
Any ideas?
Figured it out. The following inserts a relative reference to the document js/index.html:
`Javascript API <js/index.html>`_
I want to be able to retrieve dynamic data from a web page (share prices). I started out by retrieving the html code before I realised that as it is live data, the html code will be of little use. Although I am looking to capture specific data, all i wish to do is process a webpage that I specify which will return the text off that website and not the HTML code. Basically a copy and paste of the entire page would be great..
Any ideas would be really appreciated!
'Screen Scraping' by parsing HTML is so early 2000s...what I would do is read up on Amazon's Mechnical Turk. You can develop a queued architecture where you submit urls to this Mechnical Turk service. The service would automatically distribute these bits of work to users who would then do the dirty task of copying and pasting out the valuable stock quote information you require. Users around the world would anxiously await delivery of the next URL to their Mechanical Turk inbox...pinning for the opportunity to copy/paste out another share price for your application. Sure, it might take a few minutes to update your prices, but hey, they would be HAND parsed by REAL people around the globe! Just think of the possibilities!
Well, the HTML contains the text of the website, so you "just" need to parse the HTML.
EDIT: If the data is not in the HTML but loaded dynamically, the situation is different. As I can see, you have two options:
Find out how the data is loaded (i.e. read the JavaScript on the page). If it is updated via some web service, you could query the same web service in your program.
Use a web browser to get the data and then get the dynamic HTML tree of the page. Maybe the WPF Webbrowser control can help you with this, but I'm not sure since I've never done this myself.
Is it possible to find this same data provided in a ready-to-consume format rather than scraping HTML for it? It seems like there's probably public web-services for stock quotes.
For example: A quick search for "Stock price webservice" turned up http://www.webservicex.net/stockquote.asmx; an ASMX web-service that is easy to consume in .NET.
In your Visual Studio project you should be add a reference to this service via the "Add Web Reference" command; the dialog you're given varies depending on whether your project is targeting for .NET 2.0 or .NET 3.0/3.5.
I added a reference to the service named StockPriceProxy:
Public Function GetQuote(ByVal symbol As String) As String
Using quoteService As New StockPriceProxy.StockQuote
return quoteService.GetQuote(symbol)
End Using
End Function