Rayrun
← Back to Discord Forum

Soft assertion not working in two different project setup

I have 2 project 1st one is setup project with login to the application and 2nd project is test case execution. Now the 2nd project is dependent on 1st project.in first project there are 2 soft assertion present.Now if the second assertion is fail then it is not executing other testcases that are implemented in 2nd project.

This thread is trying to answer question "How can we able to work soft assertion even if there are two different projects?"

7 replies
Deleted User

And where is the question? xD

Question is : How can we able to work soft assertion even if there are two different projects?

refactoreric

Hi, soft assertions are only 'soft' within the scope of a single test. A test will still fail if any 'soft' assertions fail. Having a 'soft' assertion only makes the single test case run to completion (or to the first failing 'hard' assertion).

So I think this question is not about soft assertions at all.

It is about how to make a dependent project execute even if a dependency has failing tests.

I suspect so far the only way is to make those tests pass. Just don't fail the setup tests on things that don't matter for the dependent projects.

Thank you for the information.

Hello. I've found that soft assertions don't work in parametrized tests. Has anybody experienced the same problem?

Can say it works fine for me, but no code... oh well.

refactoreric

Parameterized tests or not, it should not matter for the soft assertions. Maybe something else wrong in your code?

TwitterGitHubLinkedIn
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].