Contributions
Re: Push a readme.md to confluence using confluence APIs
In the request "raw form" : I see the body on one line, but when I copy-paste it, it is multi-lined. So my problem is that I want literally the characters "\n" and not it interpreted as 'newline'.5 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.5KViews0likes1Comment- 5 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.5KViews0likes1Comment
Re: Push a readme.md to confluence using confluence APIs
Let's say this is the readme I want to update : ## Test description This test verifiy : - lorem text The error is that what the API expects from a readme is : ## Test description \n This test verifiy :\n - lorem text So from my groovy script I tried to put it in the request. { "id" : "${Properties#pageId}", "type" : "page", "status" : "current", "title" : "Markdown test", "body" : { "storage" : { "value" : "<ac:structured-macro ac:name=\"markdown\" ac:schema-version=\"1\" ac:macro-id=\"1234\"><ac:plain-text-body><![CDATA[${Properties#body}]]></ac:plain-text-body></ac:structured-macro>", "representation" : "storage", "_expandable" : { "content" : "/rest/api/content/${Properties#pageId}" } } }, "version":{"number":${Properties#pageVersion}} } With : def carriageReturn= '\\n ' fileContents = fileContents.replaceAll('\n',carriageReturn).replaceAll(' \r',"") Except '\\n' is interpreted as the a carriage return when i want it to be litteraly '\n'5 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.5KViews0likes5CommentsRe: Push a readme.md to confluence using confluence APIs
Yes, but as I am using confluence API to send back : so I have this body to fill Especially the value in which I am replacing${Properties#body} by the readme.md text { "id" : "${Properties#pageId}", "type" : "page", "status" : "current", "title" : "Markdown test", "body" : { "storage" : { "value" : "<ac:structured-macro ac:name=\"markdown\" ac:schema-version=\"1\" ac:macro-id=\"1234\"><ac:plain-text-body><![CDATA[${Properties#body}]]></ac:plain-text-body></ac:structured-macro>", "representation" : "storage", "_expandable" : { "content" : "/rest/api/content/${Properties#pageId}" } } }, "version":{"number":${Properties#pageVersion}} } To be more precise I have this readme: ## Title text ## Another Title another text That I want to convert into : ## Title \n text \n ## Another Title \n another text So that it can be supplied in the body in my request. Best regards, pizzaTime5 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.6KViews0likes13CommentsPush a readme.md to confluence using confluence APIs
Hello, So I'm trying to push readme to confluence, except that Confluence APIs accepts the body as json, but my readme is a multiline text.. In confluence I have a waiting plugin to convert the text into a well-formed readme :) So I'm trying to convert a multiline text into a single line so that I can automate pushing all readme to confluence. One of my problem now is to locate the carriage return , and convert it into "\\n" but I'm new to groovy and I don't know how to do that. One of the future struggle is going to be : how to parse through directories to locate readme. many thanks pizzaTime5 years agoPlace ReadyAPI QuestionsReadyAPI Questions3.3KViews0likes15CommentsRe: Data source error using gitlab
Hello Rao, Yes, sorry I totally forgot about it : I'm using a DataSource step so I first used it through "Browse". In another project, I'm trying to get a readme, to use it in a body, I'm trying by Groovy script. Kind regards, pizzaTime5 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.3KViews0likes2CommentsData source error using gitlab
Hello, While writing my tests, I import from csv.file data that are used in request (body) but when launched through GitLab, in allure reports my tests failed with : Error:java.io.FileNotFoundException: /projectDir/file.csv (No such file or directory) ----------------- Messages ------------------------------ Could you help me find the right way to write the path? The csv files are in /projectDir/TestSuite/file.csv I tried with ${projectDir}/TestSuiteName ${workspaceDir}/TestSuiteName /branch/projectName/TestSuiteNameSolved1.3KViews0likes4Comments