Can I set up an integration testing environment with no app available and no code? If so, how?
Right now I have a test solution set up for ASP.NET and I can't launch it because it says WebServer failed to listen on port port_number. I am trying to use XUnit now:
I thought that WebApplicationFactory should have generated a web server for testing, but it's not doing so. I need it so I can debug this code, if I can.
28 Replies
For ASP.NET Core, you can build integration test cases around Kestrel, but for ASP.NET 4.x your option is limited to IIS Express or local IIS.
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
"without IIS or IIS Express" is only applicable to ASP.NET Web API/SignalR on OWIN self hosting, but not general ASP.NET 4.x on System.Web.
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
TeBeCo
there's absolutly no need of IIS / IIS express if you're using Topshelf / Owin / Webapi2
Quoted by
<@689473681302224947> from #Can I set up an integration testing environment with no app available and no code? If so, how? (click here)
React with ❌ to remove this embed.
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
Sure. Always painful to distinguish the two.
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
Like this:
the Program.cs doesn't have anything (no I don't know what I'm doing 😆 🙃), here it is:
here is the .csproj:
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
No, I've just been trying a bunch of stuff to see if it would work. All the weirdness is a product of that experimentation. I was only asked to make the skeletons of the tests, as in just the arrange and assert parts, it's not meant to actually work yet.
If I can't debug the code that is a problem, but I'll deal with it
What would you expect to find in a Program.cs?
In this context...
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
I actually don't know and would like to learn
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
but if there is no existing app, what is the point of that command?
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
but these tests are for a different app
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
So, would you say there is a way to set up an integration testing environment with no app?
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
welcome to my life the past two weeks
I agree
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
It's a school thing, mine is just the devops part of a 4 part web app project. Two of my colleagues are making the app, but they only have to deliver it by the end of the semester, which is also when I have to deliver the tests for an app that will only exist god knows when. I suppose the people in charge seem to be at least a little understanding of the impracticability of my situation, so that's good, but it is very stupid for sure.
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
Nah, I'm not. And their repo doesn't even have anything in it yet.
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View
Listen, I appreciate your help and I'm sorry to have wasted your time, but I don't think there is any help you can give me at this point.
yeah, thanks for clearing it up 🙂
Unknown User•8mo ago
Message Not Public
Sign In & Join Server To View