- ABP Framework version: v7.2.2
- UI Type: MVC
- Database System: EF Core
- Tiered (for MVC) or Auth Server Separated (for Angular): no
Hello,
We are attempting to implement Playwright for end-to-end testing in our application. Prior to adding playwright, we are able to run the sample tests included in startup solutions from abp successfully and in non-abp applications we are able to add Playwright per their documentation for Visual Studio and test successfully. However once we add the Playwright into an abp generated solution, then the tests will not complete and seem to get hung up.
I see in the abp docs (https://docs.abp.io/en/abp/latest/Testing), it says that xUnit, NSubstitute, and Shoudly are the libraries already installed for startup projects for testing, but it also says these can be replaced. However, I did not find any resources on how to accomplish this.
Is there any guidance we can get for adding Playwright and having it work with our abp application? Additionally if Playwright is not recommended for end-to-end testing with abp applications, then do you have any recommended ones?
18 Answer(s)
-
0
Hello,
have you checked this community video https://community.abp.io/events/ui-testing-with-playwright-upcoming-abp-7.0-exppajuj please do check if it helps you,
thanks.
-
0
Hello,
I did watch the video, but the the example used in there did not seem to be using an abp generated application like we are attempting to add Playwright to.
The issue seems to be that once we add Playwright per the instructions in their documentation. The included testing structure from an abp startup project and Playwright are interfering with each other and causing all testing to not run (even if it is only the sample tests). Is there any recommendation or guidance on how to get Playwright added and working in an abp generated application?
-
0
Hello,
Please have look to this example once https://github.com/microsoft/playwright if find helpful.
thanks
-
0
Hello,
I have taken a look at the link you sent. As previously stated, we can successfully install Playwright using the information in their documentation. When we do this on non-Abp generated projects, it works as intended and as their documentation shows. However, when we add it to projects we generated from an Abp startup template via Abp Suite, we cannot get any tests to run. This seemingly points to Playwright and the pre-installed testing libraries from the Abp template are interfering with each other in some way.
Is their any guidance or recommendations on getting Playwright working in an Abp generated project?
-
0
Hello,
please check this https://playwright.dev/docs/intro if it helps you.
Thanks
-
0
Hello,
I have taken a look at the link you sent, but unfortunately it was not able to help. Would it be possible for you to send a sample abp generated project that has Playwright added and working so I can see how it is implemented?
-
0
hi
When we do this on non-Abp generated projects, it works as intended and as their documentation shows. However, when we add it to projects we generated from an Abp startup template via Abp Suite, we cannot get any tests to run. This seemingly points to Playwright and the pre-installed testing libraries from the Abp template are interfering with each other in some way.
Can you share the project that uses abp and Playwright? I will download and check it . liming.ma@volosoft.com
-
0
Hello,
I sent a sample project to your email.
Please let me know if you need anything further from me.
-
0
ok, I will check it.
-
0
hi
Please try to remove the
typeof(Microsoft.Playwright.NUnit.PlaywrightTest)
fromAbpPlaywrightTestTestBaseModule
[DependsOn( typeof(AbpAutofacModule), typeof(AbpTestBaseModule), typeof(AbpAuthorizationModule), typeof(AbpPlaywrightTestDomainModule) // typeof(Microsoft.Playwright.NUnit.PlaywrightTest) )] public class AbpPlaywrightTestTestBaseModule : AbpModule
-
0
Hello,
I removed the typeof(Microsoft.Playwright.NUnit.PlaywrightTest) where you advised, but I am still unable to run the tests. It continuously spins on Starting Test discovery.
-
0
-
0
Does the Playwright sample test under AbpPlaywrightTest.TestBase.TestExample run for you?
-
0
hi
I haven't tried it.
-
0
The Playwright test is what we are more concerned with since that is what we will be using for our testing and we have not been able to get it to run playwright tests successfully in an abp generated project, only in non-abp projects.
-
0
-
0
Can you tell me what version of Visual Studio that you are running this in? We are trying to rule that out as a possibility for why it's not working on our end.
-
0
hi
I'm using the Rier.
https://www.jetbrains.com/rider/