Jenkins doesn't find fonts for phpDocumentor - jenkins

I have a problem with Jenkins and phpDocumentor. After a successful build, I want to open the documentation. Everything works fine except the icons, which are displayed as squares. A short look in the developer tools shows this error message:
Request:
GET /job/PROJECTNAME/javadoc/font/fontawesome-webfont.woff?v=3.2.1 HTTP/1.1
Host: URLTOJENKINS
Connection: keep-alive
Cache-Control: no-cache
Pragma: no-cache
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36
Accept: /
Referer: http://URLTOJENKINS.com/job/PROJECTNAME/javadoc/namespaces/SOMEPAGE.html
Accept-Encoding: gzip,deflate,sdch
Accept-Language: de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4
Response:
HTTP/1.1 404 Not Found
Content-Type: text/html;charset=ISO-8859-1
Cache-Control: must-revalidate,no-cache,no-store
Content-Length: 1410
Server: Jetty(8.y.z-SNAPSHOT)

Related

Appium Inspector Specify either app or appTopLevelWindow to create a session

{
"platformName": "windows",
"appium:automationName": "windows",
"appium:appTopLevelWindow": "2f0c10"
}
This doesn't work with described error. But the same works on C#
I don't have app package or Id, only location of exe and this appTopLevelWindow.
I would like to attach the session with inspector. Can anybody help?
WinAppDriver log:
POST /session HTTP/1.1
Accept: application/json
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US
Connection: keep-alive
Content-Length: 406
Content-Type: application/json
Host: 127.0.0.1:4723
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: cross-site
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) appium-inspector/2022.2.1 Chrome/91.0.4472.164 Electron/13.6.3 Safari/537.36
{"capabilities":{"alwaysMatch":{"platformName":"windows","appium:automationName":"windows","appium:appTopLevelWindow":"2f0c10","appium:newCommandTimeout":3600,"appium:connectHardwareKeyboard":true},"firstMatch":[{}]},"desiredCapabilities":{"platformName":"windows","appium:automationName":"windows","appium:appTopLevelWindow":"2f0c10","appium:newCommandTimeout":3600,"appium:connectHardwareKeyboard":true}}
HTTP/1.1 400 Bad Request
Content-Length: 141
Content-Type: application/json
{"status":100,"value":{"error":"invalid argument","message":"Bad capabilities. Specify either app or appTopLevelWindow to create a session"}}
It is working fine with the following dependency version:
io.appium : 7.3.0
selenium-java: 3.141.0

Delete OPTIONS call fails when url contains %00(http://localhost:5432/rest/delete/author/my%00author)

When the url contains %00 the OPTIONS request failed with 400 Bad request. But if it is present in query parameters like ?name=my%00test then OPTIONS request returns 200 OK. Below is the Request and Response headers for that OPTIONS call.
Request Headers:
-----------------
OPTIONS /rest/api/books/test%00test HTTP/1.1
Host: localhost:8080
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Access-Control-Request-Method: DELETE
Access-Control-Request-Headers: content-type
Referer: http://localhost:5432/
Origin: http://localhost:5432
Connection: keep-alive
Response Headers:
-----------------
HTTP/1.1 400
Content-Type: text/html;charset=utf-8
Content-Language: en
Content-Length: 795
Date: Sat, 20 Mar 2021 09:57:30 GMT
Connection: close

Rails 5.2, Capybara launched Puma server does not set session cookie

My rails app makes use of the session, or in other words, makes use of the session id that is set in the cookie header automatically by controller responses.
This works fine except for when the app is launched via Capybara, and then for some reason the response headers never include a Set-Cookie.
It doesn't matter if the request is coming from the selenium launched browser or not. I can curl to the Capybara launched Puma server and also will never get the cookie set.
I took a look at the middleware launched by the Capybara Puma server, and it seemed to include sessions and cookies components like normal. I can't find anything about this online though, and it seems like it would be a big problem to never have sessions for doing system tests in Rails 5.2. So I suppose I'm doing something wrong somehow, but have no idea what it could be.
Here is an example normal request:
Host: localhost:3000
Connection: keep-alive
Upgrade-Insecure-Requests: 1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.1.2 Safari/605.1.15
Accept-Language: en-us
DNT: 1
Accept-Encoding: gzip, deflate
HTTP/1.1 200 OK
X-Frame-Options: ALLOWALL
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Permitted-Cross-Domain-Policies: none
Referrer-Policy: strict-origin-when-cross-origin
Content-Type: text/html; charset=utf-8
ETag: W/"bb9f6e144809fdf8359cec8ca0cbfc09"
Cache-Control: max-age=0, private, must-revalidate
Set-Cookie: _rails_app_session=......................; path=/; HttpOnly
X-Meta-Request-Version: 0.6.0
X-Request-Id: a2f2591b-7523-4c32-98a0-1d1fdc0fd231
X-Runtime: 0.867249
Vary: Origin
Transfer-Encoding: chunked
Note the Set-Cookie: _rails_app_session=......................; is present.
and here is an example when hitting capybara's server:
GET /calculator HTTP/1.1
Host: localhost:3030
Connection: keep-alive
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9
HTTP/1.1 200 OK
X-Frame-Options: ALLOWALL
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Permitted-Cross-Domain-Policies: none
Referrer-Policy: strict-origin-when-cross-origin
Content-Type: text/html; charset=utf-8
ETag: W/"040559a7884c3251acd2082604a43cf3"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: 2bc191c6-66e9-4fe6-a8d2-7980f6cc66ed
X-Runtime: 0.146430
Vary: Origin
Transfer-Encoding: chunked

Yandex tank post data

I want to use yandex tank to test my web app, I want to test registration, so i need to send request like this
Header
POST /registration HTTP/1.1
Host: localhost:8080
Connection: keep-alive
Content-Length: 30
Cache-Control: max-age=0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Origin: http://localhost:8080
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.146 Safari/537.36
Content-Type: application/x-www-form-urlencoded
Referer: http://localhost:8080/registration
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8,ru;q=0.6
Cookie: csrftoken=XJ3oheJb0SndHfNAH2lSV2AtKNxxuXdv; JSESSIONID=igq9ejgl10jirr4t73mpjblp
Form Data
login=abracadbra&password=brar
Is it possible to send that kind of requests with different login fields?
Yes, it's possible, for POST requests your should use request-style ammo file, see http://yandextank.readthedocs.org/en/latest/tutorial.html#request-style
You may specify ammo file as command line parameter or put it in tank .ini file in [phantom] section.
Remember that with phantom as load-generator it's not possible to perform scenario-based testing, so you should generate all necessary data for requests in advance. Yandex-tank will just send it according to desired load-scheme.
I'm not sure how CSRF protection works in your case, and if it does not permit re-use of session and csrftoken for multiple requests (and this parameters are mandatory for registration requests), you'll need to somehow obtain valid Cookies for each request to generate ammo. In this case I'd recommend you to switch to some scenario-based tool, i.e. jmeter. You may use jmeter as load-generator for yandex-tank as well, see http://yandextank.readthedocs.org/en/latest/configuration.html#jmeter
In case you may reuse same Cookie for multiple registrations, ammo file will be like that:
649 tag1
POST /registration HTTP/1.1
Host: localhost:8080
Connection: keep-alive
Content-Length: 30
Cache-Control: max-age=0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Origin: http://localhost:8080
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.146 Safari/537.36
Content-Type: application/x-www-form-urlencoded
Referer: http://localhost:8080/registration
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8,ru;q=0.6
Cookie: csrftoken=XJ3oheJb0SndHfNAH2lSV2AtKNxxuXdv; JSESSIONID=igq9ejgl10jirr4t73mpjblp
login=abracadbra&password=brar
646 tag2
POST /registration HTTP/1.1
Host: localhost:8080
Connection: keep-alive
Content-Length: 27
Cache-Control: max-age=0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Origin: http://localhost:8080
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.146 Safari/537.36
Content-Type: application/x-www-form-urlencoded
Referer: http://localhost:8080/registration
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8,ru;q=0.6
Cookie: csrftoken=XJ3oheJb0SndHfNAH2lSV2AtKNxxuXdv; JSESSIONID=igq9ejgl10jirr4t73mpjblp
login=sample2&password=brar
...
There is also URI+POST format similar to uri-style, but with post bodies:
load.ini:
ammo_type=uripost
ammo.uripost:
[Host: example.org]
[Connection: close]
[User-Agent: Tank]
5 /route/?rll=50.262025%2C53.276083~50.056015%2C53.495561&origin=1&simplify=1
class
10 /route/?rll=50.262025%2C53.276083~50.056015%2C53.495561&origin=1&simplify=1
hello!clas
7 /route/?rll=37.565147%2C55.695758~37.412796%2C55.691454&origin=1&simplify=1
uripost
Numbers at the beginnings of lines with uris are sizes of post bodies.

Siege does not send POST data

I'm trying to test my site with siege 3.0.1. But it seems that siege does not send POST data. Here is a request I get from web-browser
POST / HTTP/1.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Cache-Control: no-cache
Content-Length: 130
Content-Type: application/x-www-form-urlencoded
Host: rsc
Origin: http://rsc
Pragma: no-cache
Referer: http://rsc/
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.52 Safari/537.36
X-Forwarded-For: 127.0.0.1
X-Forwarded-Proto: http
X-Real-Ip: 127.0.0.1
came_from=http%3A%2F%2Frsc%2F&login=***&password=***&form.login=%D0%9E%D1%82%D0%BF%D1%80%D0%B0%D0%B2%D0%B8%D1%82%D1%8C
And here a request from siege
siege -g "http://rsc/ POST came_from=http%3A%2F%2Frsc%2F&login=***&password=***&form.login=%D0%9E%D1%82%D0%BF%D1%80%D0%B0%D0%B2%D0%B8%D1%82%D1%8C"
POST / HTTP/1.0
Accept: */*
Accept-Encoding:
Content-Length: 111
Content-Type: application/x-www-form-urlencoded
Host: rsc
User-Agent: JoeDog/1.00 [en] (X11; I; Siege 3.0.1)
X-Forwarded-For: 127.0.0.1
X-Forwarded-Proto: http
X-Real-Ip: 127.0.0.1
Am I doing something wrong? I checked siege documentation and it says nothing about POST except I should write POST my=params after url.
According to the Siege home page, 3.0.1 has a major bug with HTTP POST and the author suggests upgrading to 3.0.2
I had a similar problem - siege would not post, however the result was a "200" and then a "General Error". I tried everything, the end result: I rolled back to a previous version of 2.7.2 from 3.0.1 and it mysteriously works. Fyi.

Resources